Subject: Re: GCC3.3.1 switch coming soon.
To: Chuck Silvers <chuq@chuq.com>
From: Nathan J. Williams <nathanw@wasabisystems.com>
List: tech-kern
Date: 09/24/2003 10:36:55
Chuck Silvers <chuq@chuq.com> writes:

> from UVM's standpoint, there's no real difference between the initial stack
> for a process and any other amap-backed mapping.  other pthreads will have
> their own stacks, and we don't want to treat all of those specially,
> so we shouldn't treat the initial stack specially either.

There is one difference that would be useful. Currently, since the
kernel tracks the lowest used address of the initial stack, the
core-dumping routine only dumps the used portion, not the entire
mapped range. It would be nice (and save a lot of space in the cores
of most threaded programs) if we could also only dump the used portion
of other stacks. This probably calls for cleverness on the part of the
core-dumping code, though, rather than in the VM layer.

(There are also yellow-zone stack tricks that could be useful, but I
think those could be managed in userlevel with existing mprotect() and
faulting-address information).

        - Nathan