2005-01-18 00:41:38

by Chris Bookholt

[permalink] [raw]
Subject: legacy_va_layout

Could anyone explain or refer me to some documentation that explains the
purpose of the legacy_va_layout sysctl option?

Essentially, I'm looking to understand how the legacy layout is
different from the current 2.6-series VA space layout.

Thanks muchly in advance

-Chris
--
Chris Bookholt
[email protected]
PGP Key: http://chris.kavefish.net/pubkey.asc


2005-01-18 01:53:09

by Chris Wright

[permalink] [raw]
Subject: Re: legacy_va_layout

* Chris Bookholt ([email protected]) wrote:
> Could anyone explain or refer me to some documentation that explains the
> purpose of the legacy_va_layout sysctl option?
>
> Essentially, I'm looking to understand how the legacy layout is
> different from the current 2.6-series VA space layout.

The legacy mode splits a tasks vm into an area for heap, mmaps, and stack
at fixed points. Notably, mmap space started at 0x40000000, and new
mappings were searched from there scanning upward. While stack grew
down into that area and heap grew up into that area.

The non-legacy (flexmmap) approach, starts looking for mmap space just
below the largest possible (rlimit) stack size and scans downward. This
gives the most possible space to either brk or mmap heavy applications,
since the space doesn't start off as fragmented.

thanks,
-chris
--
Linux Security Modules http://lsm.immunix.org http://lsm.bkbits.net