Subject: CVS commit: src/sys/compat/linux/common
To: None <source-changes@NetBSD.org>
From: Jaromir Dolecek <jdolecek@netbsd.org>
List: source-changes
Date: 08/29/2004 14:08:06
Module Name:	src
Committed By:	jdolecek
Date:		Sun Aug 29 14:08:06 UTC 2004

Modified Files:
	src/sys/compat/linux/common: linux_misc.c

Log Message:
handle mmap() request with MAP_GROWSDOWN flag (request for stack-like
grow-down auto extend segment) by allocating segment sized at
current stack size limit, and offsetting requested/returned address
as required

due to how normal virtual memory management work, allocating the
full sized stack memory segment up-front actually requires exactly same
amount of VA space and physical memory as the Linux 'grow' scheme and the
'grow' scheme is quite a lot more difficult to use in applications correctly,
so it's not very apparent why Linux introduced this feature at all

this fixes Thomas Klausner's Heroes3 crash, and might also
fix PR 26687 by Jan Schaumann


To generate a diff of this commit:
cvs rdiff -r1.127 -r1.128 src/sys/compat/linux/common/linux_misc.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.