My use-case for NDK primarily is not speed but to avoid memory limitation. To be exact I need to capture full resolution images at 60 fps for few seconds until it occupies all my free RAM (which will be 3 GB out of total 4 GB in my hardware).
Since the capture speed is very fast, I can't process the images in parallel. So I want to put them in RAM on Camera2 API onImageAvailable listener callback and later retrieve them from RAM to process slowly one by one.
1) Is it even feasible to occupy all available memory or 75% of total device memory?
2) And how I can just pass objects in NDK to store in memory and later get them all in Java again.