commit 66480eb6aeb2b7fccd6237d082f8adcd6867c6f5
parent a71fc67673cb6d488265253ed862d2591536c3ae
Author: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Date: Tue, 6 Jan 2026 22:14:35 +0000
Bug 2007847 - Fails to build on sparc64-linux due to changes in memory allocator code r=pbone
Differential Revision: https://phabricator.services.mozilla.com/D277663
Diffstat:
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/memory/build/Chunk.cpp b/memory/build/Chunk.cpp
@@ -269,9 +269,9 @@ static void* pages_map(void* aAddr, size_t aSize, ShouldCommit should_commit) {
void* region = MAP_FAILED;
for (hint = start; region == MAP_FAILED && hint + aSize <= end;
hint += kChunkSize) {
- region =
- mmap((void*)hint, aSize, committed ? PROT_READ | PROT_WRITE : PROT_NONE,
- MAP_PRIVATE | MAP_ANON, -1, 0);
+ region = mmap((void*)hint, aSize,
+ should_commit ? PROT_READ | PROT_WRITE : PROT_NONE,
+ MAP_PRIVATE | MAP_ANON, -1, 0);
if (region != MAP_FAILED) {
if (((size_t)region + (aSize - 1)) & 0xffff800000000000) {
if (munmap(region, aSize)) {
diff --git a/memory/build/Chunk.h b/memory/build/Chunk.h
@@ -210,6 +210,7 @@ enum ShouldCommit {
ReserveAndCommit,
};
-void* pages_mmap_aligned(size_t size, size_t alignment, ShouldCommit committed);
+void* pages_mmap_aligned(size_t size, size_t alignment,
+ ShouldCommit should_commit);
#endif /* ! CHUNK_H */