mirror of
https://github.com/ptitSeb/box64.git
synced 2024-11-26 19:33:55 +08:00
Reworked on mmap address alignments for a performance regression (#2057)
This commit is contained in:
parent
a39249454e
commit
52ba725fa5
@ -2994,10 +2994,9 @@ EXPORT void* my_mmap64(x64emu_t* emu, void *addr, size_t length, int prot, int f
|
||||
new_flags&=~MAP_32BIT; // remove MAP_32BIT
|
||||
if((flags&MAP_32BIT) && !(flags&MAP_FIXED)) {
|
||||
// MAP_32BIT only exist on x86_64!
|
||||
if(!(flags&MAP_FIXED) && (!old_addr || !isBlockFree(old_addr, length)))
|
||||
addr = find31bitBlockNearHint(old_addr, length, 0);
|
||||
addr = find31bitBlockNearHint(old_addr, length, 0);
|
||||
} else if (box64_wine || 1) { // other mmap should be restricted to 47bits
|
||||
if(!(flags&MAP_FIXED) && (!addr || !isBlockFree(addr, length)))
|
||||
if (!(flags&MAP_FIXED) && !addr)
|
||||
addr = find47bitBlock(length);
|
||||
}
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user