use of com.ibm.j9ddr.vm29.pointer.generated.J9ObjectPointer in project openj9 by eclipse.
the class GCHeapMap method getSlotIndexAndMask.
/**
* Return the index into the heap map bits array and the bitmask to use.
* @param object
* @return an array containing the slot index and bit mask
*/
public UDATA[] getSlotIndexAndMask(J9ObjectPointer object) {
UDATA heapBaseOffset = UDATA.cast(object).sub(UDATA.cast(_heapBase));
if (heapBaseOffset.gte(_maxOffset)) {
throw new IllegalArgumentException("Object is not in heap: " + object);
}
UDATA bitIndex = heapBaseOffset.bitAnd(_heapMapBitMask);
bitIndex = bitIndex.rightShift(_heapMapBitShift);
UDATA bitMask = new UDATA(1).leftShift(bitIndex);
UDATA slotIndex = heapBaseOffset.rightShift(new UDATA(_heapMapIndexShift));
UDATA[] result = new UDATA[2];
result[0] = slotIndex;
result[1] = bitMask;
return result;
}
use of com.ibm.j9ddr.vm29.pointer.generated.J9ObjectPointer in project openj9 by eclipse.
the class GCUnfinalizedObjectListIterator method next.
public J9ObjectPointer next() {
if (hasNext()) {
J9ObjectPointer tmp = next;
next = null;
return tmp;
} else {
throw new NoSuchElementException("There are no more items available through this iterator");
}
}
use of com.ibm.j9ddr.vm29.pointer.generated.J9ObjectPointer in project openj9 by eclipse.
the class GCOwnableSynchronizerObjectListIterator method next.
public J9ObjectPointer next() {
if (hasNext()) {
J9ObjectPointer tmp = next;
next = null;
return tmp;
} else {
throw new NoSuchElementException("There are no more items available through this iterator");
}
}
use of com.ibm.j9ddr.vm29.pointer.generated.J9ObjectPointer in project openj9 by eclipse.
the class GCObjectHeapIteratorMarkMapIterator_V1 method next.
@Override
public J9ObjectPointer next() {
if (hasNext()) {
J9ObjectPointer next;
if (null == _nextObject) {
nextImpl();
}
next = _nextObject;
_nextObject = null;
if (null != next) {
return next;
}
}
throw new NoSuchElementException("No more objects");
}
use of com.ibm.j9ddr.vm29.pointer.generated.J9ObjectPointer in project openj9 by eclipse.
the class GCObjectHeapIteratorMarkMapIterator_V1 method peek.
@Override
public J9ObjectPointer peek() {
if (hasNext()) {
J9ObjectPointer next;
if (null == _nextObject) {
nextImpl();
}
next = _nextObject;
if (null != next) {
return next;
}
}
throw new NoSuchElementException("No more objects");
}
Aggregations