AFAIK, there is no easy way to check exact free memory size. Also it's not constant, it changes very often. Better solution is to use virtual memory as swap file. This file can be created somewhere on storage and mmapped, so You will have know max size block of memory. Then start using it, used pages will be cached in RAM as possible, but if there is not enough RAM they will be unloaded from memory and saved to storage.
Depends on memory block size u need u may create it every time app launches, and delete when not needed, or, if it's small enough just create it once and use.