Avoid using recursion to mark objects.
For large dumps, recursion may result in stack overflows.