]> git.proxmox.com Git - qemu.git/commit
linux-user/FLAT: fix auto-stack sizing
authorMike Frysinger <vapier@gentoo.org>
Mon, 7 Feb 2011 06:05:53 +0000 (01:05 -0500)
committerRiku Voipio <riku.voipio@nokia.com>
Wed, 9 Feb 2011 08:33:54 +0000 (10:33 +0200)
commit82a39595f7c70aecfb4649ae5a125147b62131f8
treeb9a52ae6138f83ac740227e7de29b9b0423b9f87
parent906c1b8ec8ed8987662e2697af20b9ca19c659b5
linux-user/FLAT: fix auto-stack sizing

The current auto-stack sizing works like it does on a NOMMU system; the
problem is that this only works if the envp/argv arrays are fairly slim.
On a desktop system, this is rarely the case, and can easily blow past
the stack and into data/text regions as the default stack for FLAT progs
is a mere 4KiB.  So rather than rely on the NOMMU calculation (which is
only there because NOMMU can't easily allocate gobs of contiguous mem),
calc the full space actually needed and let the MMU host make space.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Riku Voipio <riku.voipio@nokia.com>
linux-user/flatload.c