> there's nothing "at work" here. this is expected behavior:
> small mallocs allocate from the heap, and brk/sbrk hits the
> beginning of mmaped areas at 1G. glibc malloc will allocate
> big chunks using mmap (and thus deliver around 2G); a better
> malloc would fall back to mmaped arenas when brk/sbrk fails.
This has already been done in glibc since the beginning of this year
(glibc-2.1.3): When sbrk() fails, attempts are made to allocate more
arenas using mmap(). Just this week, another patch was integrated
(will be in glibc-2.2) which pushes this further, so that mmap() is
_always_ tried as a last resort.
Regards,
Wolfram.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/