My program has many works that need a lot of memory that I can’t exactly know when I need to stop it, but in case there’s very few memory left, I can force it stop using resources. So can I get how many remaining (in byte) memory that my program can use?
P/s: There’s NO way to release the process memory. They need memory, as much as possible, and that is how it works (and, no trash for collector, since old ones still be need).
Try something like:
You can read more at this blog: http://huenlil.pixnet.net/blog/post/26872625