Mem usage in Mac OSX
Pierre d'Herbemont
pdherbemont at free.fr
Wed Oct 4 11:44:42 CDT 2006
On 3 oct. 06, at 08:09, Ken Thomases wrote:
> The other really big chunk of VM (after Wine) is labeled as "STACK
> GUARD". I believe the intent of STACK GUARD space is to generate
> exceptions (EXC_BAD_ACCESS / SIGSEGV) if a stack grows beyond its
> pre-allocated bounds. It's another 1.5GB! This seems like the
> real culprit. I think STACK GUARD pages should only show up in
> single-page areas (4K) on either side of a stack. I'm seeing huge
> areas (~240MB, ~250MB, and ~1GB). There's only one actual stack
> showing. It's 8MB, between the 250MB guard and the 1GB guard.
>
> Checking a normal Mac app (Mail) shows no such huge STACK GUARD
> areas -- just a single 4K page below each actual stack.
>
> I have no idea what's creating these huge stack guard areas.
It seems that Wine itself asks for it, see:
vmmap on winemine:
STACK GUARD 8fe70000-90000000 [ 1600K] ---/rwx SM=NUL
STACK GUARD b0000000-bf800000 [253952K] ---/rwx SM=NUL
STACK GUARD c0000000-ffe00000 [1046528K] ---/rwx SM=NUL
gdb reports:
(gdb) break mmap if *(int*)($esp+8) == 0xc0000000
(gdb) c
Continuing.
Breakpoint 3, 0x90016cc3 in mmap ()
#0 0x90016cc3 in mmap ()
#1 0x60209503 in try_mmap_fixed (addr=0xc0000000, len=536870912,
prot=0, flags=4162, fildes=-1, off=0) at mmap.c:177
#2 0x6020994d in reserve_area (addr=0xc0000000, end=0xe0000000) at
mmap.c:233
#3 0x6020996a in reserve_area (addr=0xc0000000, end=0x0) at mmap.c:283
#4 0x602099ef in mmap_init () at mmap.c:350
#5 0x60208829 in wine_init (argc=2, argv=0xbffff9e8,
error=0xbffff580 "", error_size=1024) at loader.c:648
#6 0x7bf00f2d in main (argc=2, argv=0xbffff9e8) at main.c:58
Pierre
More information about the wine-devel
mailing list