Subject: Re: PROPOSAL: removal of brk()/sbrk().
To: None <tech-kern@netbsd.org>
From: David Laight <david@l8s.co.uk>
List: tech-kern
Date: 02/26/2002 08:59:03
On Tue, Feb 26, 2002 at 11:29:43AM +1100, Darren Reed wrote:
>
> Some things out there use sbrk() as the foundation of their own
> application's malloc() and siply removing sbrk() from libc will
> affect being able to compile them, never mind running them.
ISTR one of the common shells worked this way. Indeed it waited
for the fault and had a signal handler that extended the data
area.
Actually I'm not precesily sure what the planned gain is here.
(However I'm also not exactly sure what NetBSD does normally).
Some OS use mmap for the program data area anyway, with a
mechanism to extend that mapping for the bss and sbrk.
malloc should work if given discontinuous areas by sbrk - eg
if someone else is grabbing space as well.
David
--
David Laight: david@l8s.co.uk