bug-glibc
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: libio/libioP.h:ALLOC_BUF() unconditionally uses mmap()


From: Wolfram Gloger
Subject: Re: libio/libioP.h:ALLOC_BUF() unconditionally uses mmap()
Date: 15 Dec 2001 23:21:53 -0000

Hi,

> Well, the program as written just calls sbrk() when it needs more memory;  
> if sbrk() fails, it assumes it is out of memory.  Then it has its own
> allocator on top of sbrk().

Yeah, but why?  I worked many long hours to make sure the glibc allocator
is suitable for the broadest range of apps... :-)

> > I'd suggest that you reconfigure the kernel to map at something like
> > 0xA0000000 or something.  I believe there are patches around to make
> > this runtime-configurable via a /proc setting.
> 
> If you have a reference for this, that would be very helpful, as it is
> something I did not think existed and have considered implementing myself.  

I remember something being posted on comp.os.linux.development.system
about this.  Sorry, can't look further now..

> Although I do not yet understand how to do this, the best solution that
> has been suggested to me is to set a value in the binary (an ELF section
> attribute?) that would tell Linux where to start mmap() allocations for
> that particular process.

Indeed, that would be a good project, bu I believe the simplest
solution would be to disable the custom allocator.

Regards,
Wolfram.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]