summaryrefslogtreecommitdiff
path: root/runtime/gc/allocator/art-dlmalloc.cc
diff options
context:
space:
mode:
author Ruben Ayrapetyan <ruben.ayrapetyan@arm.com> 2023-09-28 18:01:33 +0100
committer Treehugger Robot <android-test-infra-autosubmit@system.gserviceaccount.com> 2023-11-30 00:02:56 +0000
commit54417d2c7e5254f8941119f8f16476c1a45e028a (patch)
tree1f4b82cbaa3df28f62624cefdf7cdf57b6370959 /runtime/gc/allocator/art-dlmalloc.cc
parent565b3b67de4b3b781b1c97aa86164c1bd604cd3d (diff)
Use globals naming scheme for kPageSize etc.
This patch is part of the chain preparing for making kPageSize non-constexpr in a future patch. The following values aren't always constexpr anymore - in some configurations these are global dynamically initialized constants. Rename them accordingly: - kPageSize to gPageSize; - kPMDSize to gPMDSize; - kPUDSize to gPUDSize; - kNumLrtSlots to gNumLrtSlots; - kStackOverflowProtectedSize to gStackOverflowProtectedSize. Also fix the typo in the kMininumMapSize identifier. Test: Same as for I5430741a8494b340ed7fd2d8692c41a59ad9c530. The whole patches chain was tested as a whole. Change-Id: Ic8502aa66d75d2bbba698282a1eaf1a029b02d3a
Diffstat (limited to 'runtime/gc/allocator/art-dlmalloc.cc')
-rw-r--r--runtime/gc/allocator/art-dlmalloc.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/runtime/gc/allocator/art-dlmalloc.cc b/runtime/gc/allocator/art-dlmalloc.cc
index 6296acd3d6..62a768db39 100644
--- a/runtime/gc/allocator/art-dlmalloc.cc
+++ b/runtime/gc/allocator/art-dlmalloc.cc
@@ -69,8 +69,8 @@ extern "C" void DlmallocMadviseCallback(void* start, void* end, size_t used_byte
return;
}
// Do we have any whole pages to give back?
- start = reinterpret_cast<void*>(art::RoundUp(reinterpret_cast<uintptr_t>(start), art::kPageSize));
- end = reinterpret_cast<void*>(art::RoundDown(reinterpret_cast<uintptr_t>(end), art::kPageSize));
+ start = reinterpret_cast<void*>(art::RoundUp(reinterpret_cast<uintptr_t>(start), art::gPageSize));
+ end = reinterpret_cast<void*>(art::RoundDown(reinterpret_cast<uintptr_t>(end), art::gPageSize));
if (end > start) {
size_t length = reinterpret_cast<uint8_t*>(end) - reinterpret_cast<uint8_t*>(start);
int rc = madvise(start, length, MADV_DONTNEED);