Expand the virtual address space on Windows

This commit is contained in:
Justine Tunney 2024-07-27 08:19:05 -07:00
parent efb3a34608
commit 690d3df66e
No known key found for this signature in database
GPG key ID: BE714B4575D6E328

View file

@ -44,7 +44,7 @@
#define MMDEBUG IsModeDbg() #define MMDEBUG IsModeDbg()
#define MAX_SIZE 0x0ff800000000ul #define MAX_SIZE 0x0ff800000000ul
#define MAX_TRIES 10 #define MAX_TRIES 50
#define MAP_FIXED_NOREPLACE_linux 0x100000 #define MAP_FIXED_NOREPLACE_linux 0x100000
@ -379,7 +379,7 @@ static int __munmap(char *addr, size_t size) {
void *__maps_randaddr(void) { void *__maps_randaddr(void) {
uintptr_t addr; uintptr_t addr;
addr = _rand64(); addr = _rand64();
addr &= 0x007fffffffff; addr &= 0x3fffffffffff;
addr |= 0x004000000000; addr |= 0x004000000000;
addr &= -__gransize; addr &= -__gransize;
return (void *)addr; return (void *)addr;