Skip to content

OutOfMemoryError: lower memory usage for M heap dumps #223

Closed

Description

When parsing an Android M heap dump with perflib, LeakCanary uses 50mb. The heap dump itself is 13Mb.

I've been playing with perflib and with MAT to figure this out.

MAT says that the heap dump has 48172 unique roots. An object can be a GC root for more than one reason, so here's the decomposition:

THREAD_OBJ=15
NATIVE_STACK=295
SYSTEM_CLASS=197490
UNKNOWN=44338

Perflib finds ~200K GC Roots, which corresponds.

I started digging, and I found that there are only 3802 unique objects that are a gc root as a "System Class" at least once.

In other words, the heap dump contains the same information over and over again, on average 50 times per class.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions