This changes a mmap in MemArena so you don't need 786MB of memory free to actually allocate the 1GB memory space in Linux 32bit. I was also running in to this issue in my development. Kudos to plbl4ster to actually taking the time to research this. Closes issue 5625.
This commit is contained in:
parent
1e174ad31a
commit
b4ae200d0d
|
@ -118,8 +118,7 @@ u8* MemArena::Find4GBBase()
|
||||||
}
|
}
|
||||||
return base;
|
return base;
|
||||||
#else
|
#else
|
||||||
void* base = mmap(0, 0x31000000, PROT_READ | PROT_WRITE,
|
void* base = mmap(0, 0x31000000, PROT_NONE, MAP_ANON | MAP_PRIVATE, -1, 0);
|
||||||
MAP_ANON | MAP_SHARED, -1, 0);
|
|
||||||
if (base == MAP_FAILED) {
|
if (base == MAP_FAILED) {
|
||||||
PanicAlert("Failed to map 1 GB of memory space: %s", strerror(errno));
|
PanicAlert("Failed to map 1 GB of memory space: %s", strerror(errno));
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Reference in New Issue