for (int i = 0; i < stackSize; i += slotSize) { Address child = Unsafe.getAddress(stack, i); if (child != null) { if (heapManager.isObject(child)) { processChild(child);
if (stack != null) { for (int i = 0; i < stackSize; i += slotSize) { Address child = Unsafe.getAddress(stack, i); if (child != null) { if (heapManager.isObject(child)) { processChild(child); }
    private void markThreadStack(VmThread thread) {        // For now do it stupid, but safe, just scan the whole stack.        final int stackSize = thread.getStackSize();        final Object stack = helper.getStack(thread);        for (int i = 0; i < stackSize; i += slotSize) {            Address child = Unsafe.getAddress(stack, i);            if (child != null) {                if (heapManager.isObject(child)) {                    processChild(child);                }            }        }    }