Size of native memory in Android Profiler
Asked Answered
H

1

12

In Android Studio Profiler, there are two places which display the size of native memory occupied by an app.

enter image description here

The first place is in the horizontal bar. Profiler documentation describes this as: "Native: Memory from objects allocated from C or C++ code".

The second place is the app heap dump, Native Size column. In documentation it is described: "Native Size: Total amount of native memory used by this object type (in bytes)"

In my case, the horizontal bar displays 30.12 MB and the heap dump "native size" column displays around 9.28 MB (which is the sum of all objects in app heap that have non-zero native size column)

Why are these two sizes different?

Harwilll answered 19/2, 2018 at 9:38 Comment(0)
A
2

For the "horizontal bar" if you look closely you'll realize that the size of the memory used by graphics is 0. reason for this is that on some devices, bitmaps and other graphical assets are handled in the native memory. So extra memory other than the 9.28mb is most likely these graphical assets.

Arita answered 9/9, 2020 at 16:47 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.