| * Copyright 1995 Martin von Loewis and Cameron Heide |
| /*********************************************************************** |
| * VirtualAlloc (KERNEL32.548) |
| LPVOID VirtualAlloc(LPVOID lpvAddress, DWORD cbSize, |
| DWORD fdwAllocationType, DWORD fdwProtect) |
| printf("VirtualAlloc: size = %ld, address=%p\n", cbSize, lpvAddress); |
| ptr = malloc(cbSize + 65536); |
| /* Round it up to the next 64K boundary and zero it. |
| ptr = (void *)(((unsigned long)ptr & 0xFFFF0000L) + 0x00010000L); |
| printf("VirtualAlloc: got pointer %p\n", ptr); |
| /*********************************************************************** |
| * VirtualFree (KERNEL32.550) |
| BOOL VirtualFree(LPVOID lpvAddress, DWORD cbSize, DWORD fdwFreeType) |