I'm currently building an Android application that works on a series of image analysis feature. This application works with Raspberry Pi Camera and the streaming is done by using MJPEG Stream, captured by WebView. In fact, it works with OpenCV also in order to analyse the image.
The thing is, after the analysis, it often shows the message as below (I mean, continuously), especially when I tried to connect back to the stream in WebView:
W/Adreno-GSL: : sharedmem_gpumem_alloc: mmap failed errno 12 Out of memory
E/Adreno-GSL: : GSL MEM ERROR: kgsl_sharedmem_alloc ioctl failed.
I'm working on a Samsung Tab with 4Gb RAM and I do check on the profiler, the memory usage doesn't even exceed 1.5Gb. I do apply .recycle()
in Android Studio and .release()
in OpenCV CPP Script to clear out the image but the error still remains and make my application crashed.
Does anyone have any ideas or experiences to deal with this issue?