Android Emulator memory leaks ?

1,031 views
Skip to first unread message

Romain Tisserand

unread,
Apr 13, 2016, 10:51:52 AM4/13/16
to Android emulator development
Hello,

I am currently experimenting with the AOSP emulator (latest stable SDK tools 25.1.1) on Windows.
I am facing some memory leaks with the following steps :

1. Start the AVD instance (typically API 22 and API 23 images, both x86 and x86_64). I am using host GPU acceleration.
2. Note the heap size (should be more or less the memory size allocated to the device plus a bit of overhead for QEMU).
3. Launch an OpenGL game, play 30 seconds.
4. Kill the game (as you would do on a real phone), relaunch it.
5. Repeat steps 3 and 4 around 10 times.
6. Observe how the heap has increased.

Observing the memory inside the guest system is obviously stable (using adb shell dumpsys meminfo), so it seems something outside the guest is not managed properly.
Could it be possible than the OpenGL "host" renderer does not free some resources like textures ?

Is is a known issue ? Is there a way to workaround this issue ?
This is a show-stopper for the project I'm working on.

Thanks for your insights !

David Turner

unread,
Apr 13, 2016, 5:17:44 PM4/13/16
to Romain Tisserand, Android emulator development
On Thu, Apr 7, 2016 at 11:26 AM, Romain Tisserand <romain.t...@gmail.com> wrote:
Hello,

I am currently experimenting with the AOSP emulator (latest stable SDK tools 25.1.1) on Windows.
I am facing some memory leaks with the following steps :

1. Start the AVD instance (typically API 22 and API 23 images, both x86 and x86_64). I am using host GPU acceleration.
2. Note the heap size (should be more or less the memory size allocated to the device plus a bit of overhead for QEMU).
3. Launch an OpenGL game, play 30 seconds.
4. Kill the game (as you would do on a real phone), relaunch it.
5. Repeat steps 3 and 4 around 10 times.
6. Observe how the heap has increased.

Observing the memory inside the guest system is obviously stable (using adb shell dumpsys meminfo), so it seems something outside the guest is not managed properly.
Could it be possible than the OpenGL "host" renderer does not free some resources like textures ?

It definitely looks like a leak, but it'd be useful to have more information. For example, what do you call "the heap" exactly and how to you measure it (e.g. if it was the emulator's own dynamic memory heap, leaking textures would not affect it, since they are stored in GPU memory). Also do you see this with all OpenGL games, or specific ones. What would be the best way to reproduce the issue. 
 
Is is a known issue ? Is there a way to workaround this issue ?
This is a show-stopper for the project I'm working on.

Probably not a known issue, unless we have more details. You can have a look at b.android.com and search for existing bugs. And if not, create a new entry.

Thanks for the info

- Digit

 
Thanks for your insights !

--
You received this message because you are subscribed to the Google Groups "Android emulator development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-emulator...@googlegroups.com.
To post to this group, send email to android-em...@googlegroups.com.
Visit this group at https://groups.google.com/group/android-emulator-dev.
For more options, visit https://groups.google.com/d/optout.

Bo Hu

unread,
Apr 14, 2016, 10:29:42 AM4/14/16
to David Turner, Romain Tisserand, Android emulator development
I created one, feel free to add more details

Reply all
Reply to author
Forward
0 new messages