Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
Signed-off-by: gengjun-git <[email protected]>
  • Loading branch information
gengjun-git committed Nov 22, 2024
1 parent 9cc3bae commit 30b2d73
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@
import java.util.concurrent.ConcurrentHashMap;

public interface MemoryTrackable {
// The default implementation of estimateSize only calculate the shadow size of the object.
// The shadow size is the same for all instances of the specified class,
// so using CLASS_SIZE to cache the class's instance shadow size.
// the key is class name, the value is size
Map<String, Long> CLASS_SIZE = new ConcurrentHashMap<>();

default long estimateSize() {
Expand Down

0 comments on commit 30b2d73

Please sign in to comment.