mmap should try to honour the address hint

This commit is contained in:
Hamish Morrison 2012-03-26 05:37:20 +00:00 committed by Jerome Duval
parent 6aaadd60dd
commit 8d40592821

View File

@ -113,7 +113,7 @@ mmap(void* address, size_t length, int protection, int flags, int fd,
int mapping = (flags & MAP_SHARED) != 0
? REGION_NO_PRIVATE_MAP : REGION_PRIVATE_MAP;
uint32 addressSpec = B_ANY_ADDRESS;
uint32 addressSpec = address == NULL ? B_ANY_ADDRESS : B_BASE_ADDRESS;
if ((flags & MAP_FIXED) != 0)
addressSpec = B_EXACT_ADDRESS;