Reputation: 45
I am working on and Android app, and have noticed quite a large disparity between the heap size when I use an emulator, and the heap size when I use a real device.
I am using a Nexus 6, and a Nexus 6 emulator to test the app. When I use the real device, my heap size is around 40mb, and allocated is around 23mb.
However, when I use the emulator, my heap doesn't go above 8mb.
Why is there such a large difference?
Upvotes: 0
Views: 508
Reputation: 2976
How large your heap is depends on your device, how much ram it has total and the device manufacturer. You probably set up your emulator with little ram, resulting in that a large heap on the emulator may be smaller than a normal heap on a real device.
Consider this stack overflow post:
Detect application heap size in Android
Upvotes: 2