mirror of
https://github.com/decompals/wibo.git
synced 2025-12-12 14:46:09 +00:00
Force VirtualAlloc allocations to fall below the 2GB mark (#36)
Co-authored-by: ConorBobbleHat <c.github@firstpartners.net>
This commit is contained in:
@@ -1171,6 +1171,10 @@ namespace kernel32 {
|
||||
void *mem = 0;
|
||||
posix_memalign(&mem, 0x1000, dwSize);
|
||||
memset(mem, 0, dwSize);
|
||||
|
||||
// Windows only fences off the lower 2GB of the 32-bit address space for the private use of processes.
|
||||
assert(mem < (void*)0x80000000);
|
||||
|
||||
DEBUG_LOG("-> %p\n", mem);
|
||||
return mem;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user