Skip to content

Commit d8e37c3

Browse files
targosCommit Bot
authored andcommitted
FreeBSD/Solaris: Fix OS::Allocate
The signature of the method was changed in implementation was not updated for those platforms. https: //chromium-review.googlesource.com/c/558876 but the Change-Id: I507d7877988287c352ee2690bac540f835c19ebf Reviewed-on: https://chromium-review.googlesource.com/600194 Reviewed-by: Michael Lippautz <[email protected]> Commit-Queue: Michael Lippautz <[email protected]> Cr-Commit-Position: refs/heads/master@{#47258}
1 parent 1c9de0b commit d8e37c3

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

src/base/platform/platform-freebsd.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,10 @@ TimezoneCache* OS::CreateTimezoneCache() {
4141
}
4242

4343
void* OS::Allocate(const size_t requested, size_t* allocated,
44-
OS::MemoryPermission access) {
44+
OS::MemoryPermission access, void* hint) {
4545
const size_t msize = RoundUp(requested, getpagesize());
4646
int prot = GetProtectionFromMemoryPermission(access);
47-
void* mbase = mmap(NULL, msize, prot, MAP_PRIVATE | MAP_ANON, -1, 0);
47+
void* mbase = mmap(hint, msize, prot, MAP_PRIVATE | MAP_ANON, -1, 0);
4848

4949
if (mbase == MAP_FAILED) return NULL;
5050
*allocated = msize;

src/base/platform/platform-solaris.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,10 @@ double SolarisTimezoneCache::LocalTimeOffset() {
5959
TimezoneCache* OS::CreateTimezoneCache() { return new SolarisTimezoneCache(); }
6060

6161
void* OS::Allocate(const size_t requested, size_t* allocated,
62-
OS::MemoryPermission access) {
62+
OS::MemoryPermission access, void* hint) {
6363
const size_t msize = RoundUp(requested, getpagesize());
6464
int prot = GetProtectionFromMemoryPermission(access);
65-
void* mbase = mmap(NULL, msize, prot, MAP_PRIVATE | MAP_ANON, -1, 0);
65+
void* mbase = mmap(hint, msize, prot, MAP_PRIVATE | MAP_ANON, -1, 0);
6666

6767
if (mbase == MAP_FAILED) return NULL;
6868
*allocated = msize;

0 commit comments

Comments
 (0)