|
From: Nicholas N. <nj...@cs...> - 2005-05-19 21:15:38
|
On Thu, 19 May 2005, Thomas Steffen wrote: > If you look at the realloc function in memcheck, you will find this is > by design. Realloc always returns a fresh piece of address space, so > that it can check for any old pointer that are not updated. Of course > this uses a lot of address space, which means it uses a lot of memory. Are you sure? It looks to me like it reuses the same memory if the new size is smaller or equal to the old size. It allocates new memory if the new size is bigger. But the allocator does avoid recycling freed blocks for a while, which might explain the 700MB figure. N |