This is the mail archive of the glibc-bugs@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libc/167] malloc() eats excess ram


------- Additional Comments From bluefoxicy at linux dot net  2004-05-18 21:01 -------
Interesting thought.  mmap() lets you force it to fail if you can't map new ram
to a given address.  You could use this for realloc().  Other than that, you
could "try" to get mmap() to give you contiguous segments, but keep track of
them in your own table (on the heap or in a specially allocated mmap() block)
either way, so that you can effectively use whatever mmap() gives you as a
scattered heap.  The difference would be that when you have chunks in the middle
unallocated, you can free them back to the system.

This would be a crossbreed between what I understand to be the current
heap-based malloc() code in glibc/malloc/ and the current mmap() fallback in
glibc/malloc, right?  It might work excessively well.

-- 


http://sources.redhat.com/bugzilla/show_bug.cgi?id=167

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]