Re: realloc
Re: realloc
- Subject: Re: realloc
- From: Eric Grant <email@hidden>
- Date: Tue, 18 Mar 2003 00:14:23 -0800
On Mon, 17 Mar 2003 09:11:53 +0100, Jonas Maebe <email@hidden>
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 | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/darwin-kernel
Do not post admin requests to the list. They will be ignored.