> > Well, the linked list would be freed (or the first item of it enlarged > > to the total size, depending on implementation details). > > Still, the peak memory use will twice the size, won't it? sure but unless you are very lucky a call to reallocmem also means alocate-copy-deallocate.