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

Note that libc-hacker is a closed list. You may look at the archives of this list, but subscription and posting are not open.


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

Re: Malloc not trimming sbrk space once it fills up


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


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