@@ -68,7 +68,7 @@ static void sort_zoffset_ptrs(void* at, size_t size) {
6868class ZSegmentStash {
6969private:
7070 ZGranuleMap<zoffset>* _physical_mappings;
71- ZArray<zoffset> _stash;
71+ ZArray<zoffset> _stash;
7272
7373 void sort_stashed_segments () {
7474 sort_zoffset_ptrs (_stash.adr_at (0 ), (size_t )_stash.length ());
@@ -675,11 +675,11 @@ void ZPageAllocator::remap_and_defragment_mapping(const ZMemoryRange& vmem, ZArr
675675 // Restore segments
676676 segments.pop (entries, num_ranges);
677677
678- // The entries array may contain entires from other defragmentations as well,
678+ // The entries array may contain entries from other defragmentations as well,
679679 // so we only operate on the last ranges that we have just inserted
680- int numa_id = _virtual.get_numa_id (vmem);
680+ const int numa_id = _virtual.get_numa_id (vmem);
681681 for (int idx = entries->length () - num_ranges; idx < entries->length (); idx++) {
682- ZMemoryRange v = entries->at (idx);
682+ const ZMemoryRange v = entries->at (idx);
683683 map_virtual_to_physical (v, numa_id);
684684 pretouch_memory (v.start (), v.size ());
685685 }
@@ -1060,7 +1060,7 @@ void ZPageAllocator::satisfy_stalled() {
10601060
10611061void ZPageAllocator::prepare_memory_for_free (ZPage* page, ZArray<ZMemoryRange>* entries, bool allow_defragment) {
10621062 // Extract memory and destroy page
1063- ZMemoryRange vmem = page->virtual_memory ();
1063+ const ZMemoryRange vmem = page->virtual_memory ();
10641064 const ZPageType page_type = page->type ();
10651065 safe_destroy_page (page);
10661066
0 commit comments