When running any application that utilizes GPU acceleration through Zink in Termux X11, the ION memory usage significantly increases as expected. However, this increased allocation does not decrease back to its original level after the application is terminated. This behavior leads to a gradual accumulation of used ION memory that is not released, affecting the overall performance and usability of the device until it completely hangs up.
Close the application normally and restart it several times
Check used ION memory which increases with every app start but does not decrease after stopping the application
adb shell
dumpsys meminfo
Output
Total RAM: 5,583,492K (status normal)
Free RAM: 434,608K ( 144,056K cached pss + 75,336K cached kernel + 215,216K free)
ION: 4,002,788K (3,703,976K mapped + 298,812K unmapped + 0K pools)
GPU: 0K
Used RAM: 5,441,876K (4,817,024K used pss + 624,852K kernel)
Lost RAM: 360,827K
ZRAM: 302,552K physical used for 971,336K in swap (3,145,724K total swap)
Tuning: 256 (large 512), oom 322,560K, restore limit 107,520K (low-ram)
Stopping all chroot processes does not decrease used ION. Only terminating the termux-x11 process started through termux environment leads to decrease of the used ION.
### What is the expected behavior?
ION memory is released as soon as the GPU-accelerated applications is closed.
Problem description
When running any application that utilizes GPU acceleration through Zink in Termux X11, the ION memory usage significantly increases as expected. However, this increased allocation does not decrease back to its original level after the application is terminated. This behavior leads to a gradual accumulation of used ION memory that is not released, affecting the overall performance and usability of the device until it completely hangs up.
Environment:
What steps will reproduce the bug?
Open Termux X11and start via
termux-x11
ortermux-x11 -ac
Enter chroot environment
Start any GPU-accelerated application using the Zink library
Close the application normally and restart it several times
Check used ION memory which increases with every app start but does not decrease after stopping the application
Output
Total RAM: 5,583,492K (status normal) Free RAM: 434,608K ( 144,056K cached pss + 75,336K cached kernel + 215,216K free) ION: 4,002,788K (3,703,976K mapped + 298,812K unmapped + 0K pools) GPU: 0K Used RAM: 5,441,876K (4,817,024K used pss + 624,852K kernel) Lost RAM: 360,827K ZRAM: 302,552K physical used for 971,336K in swap (3,145,724K total swap) Tuning: 256 (large 512), oom 322,560K, restore limit 107,520K (low-ram)