public void breadthFirstSearch(Object root, Visitor visitor, boolean includeStatics)
      throws IllegalArgumentException, IllegalAccessException {
    VisitStack stack = new VisitStack(visitor, includeStatics);

    stack.add(null, root);
    while (!stack.isEmpty()) {
      Object next = stack.next();
      doSearch(next, stack);
    }

  }
Visit all objects reachable from a given root object, using a breadth first search. Using this
method requires some heap space - probably between 8 - 30 bytes per reachable object.

@param root object to traverse from
@param visitor a visitor to visit each node
@param includeStatics if true, then first time we see a new object type, all of its static
       fields will be visited.
geode-core/src/main/java/org/apache/geode/internal/size/ObjectTraverser.java