Boxed numbers are objects such as java.lang.Integer, java.lang.Float etc. Each such object is allocated on the heap, contains all the standard internal “bookkeeping” data that the JVM needs, and therefore takes much more memory than its “payload” value. For example, a plain int number takes 4 bytes, but an instance of java.lang.Integer takes 16 bytes in most JVM implementations. Boxed numbers were introduced mainly to support “numeric” elements in collections such as ArrayLists or HashMaps. …
Author: Mikhail Dmitriev
JXRay 2.7 update 6 released
Today we released JXRay 2.7u6. This version contains numerous usability improvements, some performance improvements and bug fixes, including, but not limited to: Faster and more accurate analysis of some Android heap dumps Big HTML reports that JXRay may generate are now rendered much faster by browsers Retained memory reported for all objects. The “Where memory goes, by class” table can be sorted by any column Instances of classes such as java.util.Date, java.lang.reflect.Method, java.math.BigInteger etc. are …
Tip of the day: secure analysis of heap dumps
If an app keeps sensitive data such as credit card numbers, passwords etc. in its memory, then its heap dump will contain that information as well. That creates legitimate concerns, especially at big companies: what if sensitive data leaks after we shared a dump with another team to facilitate debugging? Fortunately, JXRay is already much better than most other tools in this respect. First, as explained in one of our previous posts, it allows you …
Tip of the day: analyzing big heap dumps
Our users sometimes try to analyze a big heap dump (say 30G) on a machine, typically their laptop, that has a much smaller RAM (say 8G). Unfortunately, for most heap dumps that doesn’t work: JXRay fails with an OutOfMemoryError. That’s sad but true: not just JXRay, but all tools for advanced heap dump analysis (Eclipse MAT, YourKit, VisualVM…) require, in the average case, the same amount of memory as the heap dump size, and preferably …
Tip of the day: what is “shallow size” and “implementation-inclusive size”?
One of the most important parts of a JXRay report is the “Where memory goes, by class” section. This table gives you the number of instances for each class, and how much memory they use. However, instead of one “memory” column, there are three: Shallow size, Implementation-inclusive size and Retained memory. What’s the difference between them? Shallow size is simple: that’s just how much memory all instances of the given class use, period. If you …