Subject: Re: GCC3.3.1 switch coming soon.
To: Bill Studenmund <wrstuden@netbsd.org>
From: Chuck Silvers <chuq@chuq.com>
List: tech-kern
Date: 09/23/2003 18:33:58
On Tue, Sep 23, 2003 at 09:28:00AM -0700, Bill Studenmund wrote:
> If I'm understanding Andrew right, the difference is that stack mappings
> have different growth semanitcs from non-stack mappings. The former (well
> the lowest one) can grow when the stack hits its bottom. The latter can
> only grow as a result of explicit system calls to map more memory. Thus if
> you access just below a mapping, you either want to grow it or return an
> error, depending on if it's a stack or not.

it doesn't quite work that way.  there are potentially multiple map entries
involved in both stack and non-stack mappings, and the entries which actually
have amaps allocated for them can grow in either case.  the amap code tries
to coalesce amaps where possible to keep the number of map entries low.
previously the coalescing would only work in some cases, a while back
andrew made it work in a lot more cases.  there are still some bugs in that,
though, so I'm thinking that the stack problem might really be a bug in the
amap merging code.

-Chuck