final int stackSize = thread.getStackSize(); final Object stack = helper.getStack(thread); if (stack != null) { for (int i = 0; i < stackSize; i += slotSize) { final Address child = helper.getAddress(stack, i); if (child != null) { if (heapManager.isObject(child)) { processChild(child); } } } }
thread.visit(processChildVisitor, heapManager, helper);
    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);        if (stack != null) {            for (int i = 0; i < stackSize; i += slotSize) {                final Address child = helper.getAddress(stack, i);                if (child != null) {                    if (heapManager.isObject(child)) {                        processChild(child);                    }                }            }        }    }