Hello
I just wonder why I cannot allocate any more memory when reaching 1GB of RAM on a device with 2GB of RAM.
The app is very computation intesive and it is developed using Android NDK r9 and tested on Samsung Note 3.
I must point out that before running my app there is about 1.6GB free of RAM, so there is enough memory to allocate more than 1GB.
Then I start allocating memory by loading objects in to my app using dlmalloc(). When reaching 1GB of memory dlmalloc fails as if it reached maximum heap memory, or address space and the app crashes of course.
So can anybody share some knowledege about this. Is there maybe a heap size limit for each process/app?? Where or how can I check these limits?? I know about Java Virtual machine limits 25 or 50 MB or somtimes 250 MB, and I do not think this is an issues, as I work in native code (NDK)
Thank you in advance
I"m somewhat confused about your apps behavior. Being computational intensive does NOT translate directly into being memory intensive. If you have to crunch that much data in a single frame or invocation of whatever computational processes you are doing, then you are on the wrong device. Also, using the NDK does not get rid of the JVM as if you application is most likely a NativeActivity which has boiler plate Java code to allow your application to run. So your app still have to play by the JVM rule. I would suggest revisting your approach as your, unless your app is the only application resident in memory on the device and the OS doesn't require any memory to run.