commit fa2c1791e96293e659a4b8546c5833533a87d154
parent c079c42b0f069778d7b6c4e2c2f2974c6456c372
Author: Paul Bone <paul@bone.id.au>
Date: Wed, 29 Oct 2025 06:32:45 +0000
Bug 1976162 - pt 3. Remove BaseAlloc::base_pages r=glandium
base_pages is only used in one function so make it local to that function.
Differential Revision: https://phabricator.services.mozilla.com/D256414
Diffstat:
2 files changed, 1 insertion(+), 2 deletions(-)
diff --git a/memory/build/BaseAlloc.cpp b/memory/build/BaseAlloc.cpp
@@ -21,7 +21,7 @@ bool BaseAlloc::pages_alloc(size_t minsize) MOZ_REQUIRES(base_mtx) {
MOZ_ASSERT(minsize != 0);
csize = CHUNK_CEILING(minsize);
- base_pages = chunk_alloc(csize, kChunkSize, true);
+ void* base_pages = chunk_alloc(csize, kChunkSize, true);
if (!base_pages) {
return false;
}
diff --git a/memory/build/BaseAlloc.h b/memory/build/BaseAlloc.h
@@ -39,7 +39,6 @@ class BaseAlloc {
// Current pages that are being used for internal memory allocations. These
// pages are carved up in cacheline-size quanta, so that there is no chance of
// false cache line sharing.
- void* base_pages MOZ_GUARDED_BY(base_mtx) = nullptr;
void* base_next_addr MOZ_GUARDED_BY(base_mtx) = nullptr;
void* base_next_decommitted MOZ_GUARDED_BY(base_mtx) = nullptr;