Malloc not trimming sbrk space once it fills up
Jakub Jelinek
jakub@redhat.com
Thu Jan 8 10:48:00 GMT 2004
On Wed, Jan 07, 2004 at 06:28:58PM -0000, wmglo@dent.med.uni-muenchen.de wrote:
> Hi,
>
> > The attached testcase shows that once morecore fails for the first time
> > and malloc needs to fall back into mmap arena, no more sbrk trimming
> > happens even if all chunks in mmap areas are freed.
>
> Thanks for the testcase, but this is to be expected.
>
> Do you think this course of events is common enough to warrant a
> change?
We've got a bug report about it, so probably some people ran into it.
I can imagine some programs which normally don't use too much memory
but at peak times need a few gigs.
It is less urgent with the kernel changes in RHEL3/Fedora Core 1
where mmap allocates from top to bottom, so most of the memory
is usable as brk area unless mmap is used with non-NULL first argument.
> I'll take a look whether it can be changed easily.
Thanks.
Jakub
More information about the Libc-hacker
mailing list