code: public static long deepMemoryUsageOf(Instrumentation inst, final Object obj, final int referenceFilter) {
  	return deepMemoryUsageOf0(inst, new HashSet<Integer>(), obj, referenceFilter);
      }
docs: Returns an estimation, in bytes, of the memory usage of the given object plus (recursively)
  objects it references via non-static references. Which references are traversed depends on the
  Visibility Filter passed in. The estimate for each individual object is provided by the running
  JVM and is likely to be as accurate a measure as can be reasonably made by the running Java
  program. It will generally include memory taken up for "housekeeping" of that object.
  
  @param obj The object whose memory usage (and that of objects it references) is to be estimated.
  @param referenceFilter specifies which references are to be recursively included in the resulting
  count (ALL,PRIVATE_ONLY,NON_PUBLIC,NONE).
  @return An estimate, in bytes, of the heap memory taken up by obj and objects it references.