Re: malloc/free question
- From: Mikko Rauhala <mjr@xxxxxx>
- Date: 1 Dec 2005 17:18:46 GMT
On 01 Dec 2005 11:09:06 -0600, joe@xxxxxxxxxxxxxxx <joe@xxxxxxxxxxxxxxx> wrote:
> brk() is used to get memory from the OS, not give it back. Normally,
> free() puts the memory being released back onto th free list, so it
> can be allocated again without a system call.
Actually, brk() can be used (on some systems, at least) for both,
so free() may use it to release memory to the OS when appropriate.
Which is not necessarily often due to fragmentation.
--
Mikko Rauhala - mjr@xxxxxx - <URL:http://www.iki.fi/mjr/>
Transhumanist - WTA member - <URL:http://www.transhumanism.org/>
Singularitarian - SIAI supporter - <URL:http://www.singinst.org/>
.
- Follow-Ups:
- Re: malloc/free question
- From: joe
- Re: malloc/free question
- References:
- malloc/free question
- From: vk02720
- Re: malloc/free question
- From: #2pencil
- Re: malloc/free question
- From: gremnebulin
- Re: malloc/free question
- From: joe
- malloc/free question
- Prev by Date: Re: malloc/free question
- Next by Date: Re: malloc/free question
- Previous by thread: Re: malloc/free question
- Next by thread: Re: malloc/free question
- Index(es):
Relevant Pages
|