Finding/changing max memory size available
Guy Harris
guy at auspex.auspex.com
Tue Jun 4 03:45:15 AEST 1991
>mmap() (or shmat()) may map a file or shared memory segment only a few K
>above the top user address, efectively placing a roadblock in the way
>of sbrk(), and thus limiting malloc().
It may, although hopefully those systems that, when asked to pick an
address for an "mmap()" or "shmat()", place it above the top user
address, rather than just below the stack limit (or above, on systems
where the stack grows upward in memory), will be dying out.
SunOS 4.x picks addresses just below the stack limit (the limit that
"getrlimit()" gets and "setrlimit()" sets); I suspect System V Release 4
does the same thing (yes, it has a stack limit, and "getrlimit()" and
"setrlimit()" as well).
More information about the Comp.unix.questions
mailing list