I think it is possible that these applications use internal memory, which may exceed the limit (they request memory from their own code).
It should be possible to do this even without inline code using ByteBuffer and call allocateDirect. This can be verified using this hack .
Update Unfortunately, this is only possible through native code in accordance with this post . They wrapped this in a java call. But for the Delyan commentator, the following Java hack for image processing is suggested:
BitmapFactory.Options opts = new BitmapFactory.Options(); Field field = opts.getClass().getField("inNativeAlloc"); field.setBoolean(opts, true);
but: "At the same time, remember that this is dangerous . If the device runs out of memory, oomkiller comes after you first. There is no warning, nothing but SIGKILL., more than ever, recycle everything that you do not need, and be very, very careful! "
Update 2 In the end, we can crack through reflection access to sun.misc.Unsafe , as is done in the popular Java-Chronicle Project ?
source share