On Mon, 17 Mar 2003 09:11:53 +0100, Jonas Maebe <jonas@zeus.rug.ac.be> wrote:
On maandag, maa 17, 2003, at 04:05 Europe/Brussels, Eric Grant wrote:
Based on my experience with some simple test programs (under OS X
10.2.3),
and confirmed by my skimming of the sources (Revision 1.1.1.4 of
malloc.c),
it appears that realloc does not "free" memory (in any meaningful
sense)
realloc is a libc function, not a kernel function. As such, when you
free memory using realloc, this memory is put back in libc's memory
allocator pool for reuse for other malloc/realloc/calloc's.
I never asserted that realloc was a kernel function (and I apologize for posting first on the wrong list). In any event, my point is precisely that the space is *NOT* reused for other malloc's, etc. The logical address space is gone, gone, gone. Do you disagree? Do you read the sources differently? Does a test program give you different results from mine on your machine(s)? Cheers, Eric _______________________________________________ darwin-kernel mailing list | darwin-kernel@lists.apple.com Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/darwin-kernel Do not post admin requests to the list. They will be ignored.
participants (1)
-
Eric Grant