Parallel pixel processing requires the allocation of two byte buffers. For a typical device resolution of 1080 x 1920, two buffers of approximately 2 MB each (4 MB total) are allocated.
This is normally more than sufficient for parallel pixel processing. However, in some instances it has been observed where the heap size for androidTest instrumentation runners is set to only 16 MB, which is not sufficient for Testify. If you encounter this exception, please verify that your emulator is correctly configured with at least 2 GB of RAM.
Testify will now throw a LowMemoryException when attempts to allocate an IntBuffer fail. This can help users diagnose AVD configuration problems and reports on the state of the device.
What does this change accomplish?
Parallel pixel processing requires the allocation of two byte buffers. For a typical device resolution of 1080 x 1920, two buffers of approximately 2 MB each (4 MB total) are allocated.
Most AVDs are configured with a heap size of 25% their available RAM. For example, 512 MB for a device with 2 GB of RAM. See: https://android.googlesource.com/platform/external/qemu/+/emu-master-dev/android/android-emu/android/main-common.c#1292
This is normally more than sufficient for parallel pixel processing. However, in some instances it has been observed where the heap size for androidTest instrumentation runners is set to only 16 MB, which is not sufficient for Testify. If you encounter this exception, please verify that your emulator is correctly configured with at least 2 GB of RAM.
Testify will now throw a
LowMemoryException
when attempts to allocate anIntBuffer
fail. This can help users diagnose AVD configuration problems and reports on the state of the device.