use of com.ibm.j9ddr.vm29.pointer.generated.MM_HeapRegionDescriptorPointer in project openj9 by eclipse.
the class GCHeapSpanRegionIterator method next.
public MM_HeapRegionDescriptorPointer next() {
if (_regionsLeft > 0) {
MM_HeapRegionDescriptorPointer region = _currentRegion;
_regionsLeft--;
_currentRegion = _currentRegion.addOffset(_tableDescriptorSize);
return region;
} else {
throw new NoSuchElementException("There are no more items available through this iterator");
}
}
use of com.ibm.j9ddr.vm29.pointer.generated.MM_HeapRegionDescriptorPointer in project openj9 by eclipse.
the class GCHeapRegionIterator method getNextTableRegion.
protected MM_HeapRegionDescriptorPointer getNextTableRegion(MM_HeapRegionDescriptorPointer heapRegion) throws CorruptDataException {
MM_HeapRegionDescriptorPointer next = heapRegion.addOffset(_tableDescriptorSize * heapRegion._regionsInSpan().longValue());
if (next.isNull()) {
return null;
}
MM_HeapRegionDescriptorPointer top = MM_HeapRegionDescriptorPointer.cast(_regionManager._regionTable().longValue() + (_tableDescriptorSize * _regionManager._tableRegionCount().longValue()));
MM_HeapRegionDescriptorPointer usedRegion = MM_HeapRegionDescriptorPointer.NULL;
MM_HeapRegionDescriptorPointer current = next;
while (usedRegion.isNull() && current.lt(top)) {
if (current._isAllocated()) {
usedRegion = current;
} else {
current = current.addOffset(_tableDescriptorSize * current._regionsInSpan().longValue());
}
}
if (usedRegion.isNull()) {
return null;
}
return usedRegion;
}
use of com.ibm.j9ddr.vm29.pointer.generated.MM_HeapRegionDescriptorPointer in project openj9 by eclipse.
the class MM_HeapRegionDescriptorHelper method getWalkableHighAddress.
public static VoidPointer getWalkableHighAddress(MM_HeapRegionDescriptorPointer region) throws CorruptDataException {
VoidPointer top = null;
long regionType = region._regionType();
if ((MM_HeapRegionDescriptor$RegionType.BUMP_ALLOCATED == regionType) || (MM_HeapRegionDescriptor$RegionType.BUMP_ALLOCATED_MARKED == regionType)) {
top = MM_MemoryPoolBumpPointerPointer.cast(region._memoryPool())._allocatePointer();
} else {
top = getHighAddress(region);
}
return top;
}
Aggregations