On Saturday, 3 בMay 2008, Shachar Shemesh wrote: > Oron Peled wrote: > > That was what I always thought. However, I found out lately > > that uclibc (in which you can compile one of three different > > allocators) uses mmap *exclusively* for heap management > > > How exclusively?
Exclusively as in "brk/sbrk does not appear in the source at all" > For example, if I "free" a piece of memory, does it do "munmap" on it? Depends on which of the 3 implementations you choose to compile. The most simplistic implementation never munmap, so it's mostly like the brk() solution but with a different syscall/semantics. The smarter one handle it similarly to a buddy system and munmap if it has an already munmapped neighbors *and* it's big enough to make this worthwhile (so it won't mmap/munmap for every small malloc/free). [Response to Tzafrir in another post: forgot to mention that all this is based on the Blackfin uclibc, didn't check about the others] -- Oron Peled Voice/Fax: +972-4-8228492 [EMAIL PROTECTED] http://www.actcom.co.il/~oron ICQ UIN: 16527398 "write your own operating system. It has worked every time for me" -- Linus Thorvalds ================================================================To unsubscribe, send mail to [EMAIL PROTECTED] with the word "unsubscribe" in the message body, e.g., run the command echo unsubscribe | mail [EMAIL PROTECTED]
