"Alexandre" == Alexandre Julliard julliard@winehq.org writes:
Alexandre> Michael Ost most@museresearch.com writes: >> Yep, it does. Give it a try. As far as I can tell: >> >> int total = 0; for (;;) { LPVOID* leak = ::VirtualAlloc(NULL, >> 1048576, MEM_RESERVE, PROT_NOACCESS); if (leak) { total += >> 1048576/1024; printf("Allocated %ldk\r", total); } else { >> printf("\n"); PrintWindowsError("VirtualAlloc", ::GetLastError(); >> break; } } >> >> will stop at 1,022,976k (1GB) on any wine machine. In winxp it goes >> up to 2GB, as it ought to.
Alexandre> That's a kernel limitation. If you hack the kernel to start Alexandre> allocating from lower addresses (or implement the syscall we Alexandre> discussed to let us specify the mmap range) you can get the Alexandre> full 2GB.
Don't we need some "non-hack" way to tell the kernel about thw desired allocation strategy?