@@ -448,10 +448,10 @@ bool ZPageAllocator::prime_state_cache(ZWorkers* workers, int numa_id, size_t to
448448 map_virtual_to_physical (vmem, numa_id);
449449
450450 if (ZNUMA::is_enabled ()) {
451- // Memory should have ended up on the desired NUMA id, if that's not the case, print error.
452- int actual = ZNUMA::memory_id (untype (ZOffset::address (vmem.start ())));
453- if (actual != numa_id) {
454- log_debug (gc, heap)(" NUMA Mismatch (priming) : desired %d, actual %d" , numa_id, actual );
451+ // Check if memory ended up on desired NUMA node or not
452+ const int actual_id = ZNUMA::memory_id (untype (ZOffset::address (vmem.start ())));
453+ if (actual_id != numa_id) {
454+ log_debug (gc, heap)(" NUMA Mismatch: desired %d, actual %d" , numa_id, actual_id );
455455 }
456456 }
457457
@@ -925,10 +925,12 @@ bool ZPageAllocator::commit_and_map_memory(ZPageAllocation* allocation, const ZM
925925 map_virtual_to_physical (committed_vmem, allocation->numa_id ());
926926 allocation->claimed_mappings ()->append (committed_vmem);
927927
928- // Memory should have ended up on the desired NUMA id, if that's not the case, print error.
929- int actual = ZNUMA::memory_id (untype (ZOffset::address (vmem.start ())));
930- if (actual != allocation->numa_id ()) {
931- log_debug (gc, heap)(" NUMA Mismatch (allocation): desired %d, actual %d" , allocation->numa_id (), actual);
928+ if (ZNUMA::is_enabled ()) {
929+ // Check if memory ended up on desired NUMA node or not
930+ const int actual_id = ZNUMA::memory_id (untype (ZOffset::address (vmem.start ())));
931+ if (actual_id != allocation->numa_id ()) {
932+ log_debug (gc, heap)(" NUMA Mismatch: desired %d, actual %d" , allocation->numa_id (), actual_id);
933+ }
932934 }
933935
934936 if (committed_vmem.size () != vmem.size ()) {
0 commit comments