public static long estimateSize(HasEstimate object) {
    return object == null ? 0 : object.estimateMemoryUsageBytes();
  }
Utilities to estimate the size of in-memory objects.
planetiler-core/src/main/java/com/onthegomap/planetiler/util/MemoryEstimator.java