JOL Java Object Layout
JetBrainsd848ca38-90d6-4adc-86df-9bf931fd8908 · v—
Java Object Layout (JOL) is a tool to analyze in memory object layout schemes in JVMs. It allows you to make an estimate how much memory the object takes. This allows to make the simplest but most efficient performance improvements. Just check your DTOs if they fit into 64 bytes of processor's cache line. For example, in HotSpot VM on 64x processor an empty string "" takes 40 bytes i.e. 24 bytes for
Rating distribution
Reviews 6
Works. comfortable.
This is really AMAZING!
Amazing! Is there any reason why the default for `Class have too big memory footprint` is 64 bytes. I mean JVM memory reason. Or it's a just good practice? Thanks
I prefer like org.openjdk.jol <dependency> <!-- JOL 可以查看 Java 对象的内部布局,也可以查看对象占用的空间 --> <!-- 错误:Process finished with exit code 137 (interrupted by signal 9: SIGKILL) 解决:切换非 Oracle JDK --> <groupId>org.openjdk.jol</groupId> <artifactId>jol-core</artifactId> <version>0.16</version> <!-- <scope>provided</scope> --> </dependency>
Hi Bohond Yes, I'll try to make a support of other languages https://github.com/stokito/IdeaJol/issues/17 Also this can be quite easy to contribute so any PR is welcome.
Can you make it support kotlin class as well.
Similar in “Profiling”
JProfiler
ejtech
JMH Java Microbenchmark Harness
d848ca38-90d6-4adc-86df-9bf931fd8908
JDK VisualGC
BeanSoft
Java JFR Profiler
82860fbb-fe8f-41e6-bb31-c1cfb0fef61e
Flow
Spot Profiler for Java and Kotlin
JetBrains