From ba6de084da5c6a65c60bc9f5e669ef4fef1af827 Mon Sep 17 00:00:00 2001
From: Hamish Morrison <hamish@lavabit.com>
Date: Mon, 26 Mar 2012 05:37:20 +0000
Subject: [PATCH] mmap should try to honour the address hint
---
src/system/libroot/posix/sys/mman.cpp | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/system/libroot/posix/sys/mman.cpp b/src/system/libroot/posix/sys/mman.cpp
index a936840..17866ee 100644
a
|
b
|
mmap(void* address, size_t length, int protection, int flags, int fd,
|
113 | 113 | int mapping = (flags & MAP_SHARED) != 0 |
114 | 114 | ? REGION_NO_PRIVATE_MAP : REGION_PRIVATE_MAP; |
115 | 115 | |
116 | | uint32 addressSpec = B_ANY_ADDRESS; |
| 116 | uint32 addressSpec = address == NULL ? B_ANY_ADDRESS : B_BASE_ADDRESS; |
117 | 117 | if ((flags & MAP_FIXED) != 0) |
118 | 118 | addressSpec = B_EXACT_ADDRESS; |
119 | 119 | |