File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -857,8 +857,9 @@ void ZPageAllocator::harvest_claimed_physical(ZPageAllocation* allocation) {
857857bool ZPageAllocator::is_alloc_satisfied (ZPageAllocation* allocation) const {
858858 // The allocation is immediately satisfied if the list of mappings contains
859859 // exactly one mapping and is of the correct size.
860+
860861 if (allocation->claimed_mappings ()->length () != 1 ) {
861- // Not a contiguous mapping
862+ // No mapping(s) or not a contiguous mapping
862863 return false ;
863864 }
864865
@@ -880,8 +881,10 @@ bool ZPageAllocator::claim_virtual_memory(ZPageAllocation* allocation) {
880881 } else {
881882 // If we have not harvested anything, we only increased capacity. Allocate
882883 // new virtual memory from the manager.
883- ZMemoryRange vmem = _virtual.alloc (allocation->size (), allocation->numa_id (), true /* force_low_address */ );
884- allocation->claimed_mappings ()->append (vmem);
884+ const ZMemoryRange vmem = _virtual.alloc (allocation->size (), allocation->numa_id (), true /* force_low_address */ );
885+ if (!vmem.is_null ()) {
886+ allocation->claimed_mappings ()->append (vmem);
887+ }
885888 }
886889
887890 // If the virtual memory covers the allocation request, we're done.
You can’t perform that action at this time.
0 commit comments