View Single Post
Posts: 726 | Thanked: 345 times | Joined on Apr 2010 @ Sweden
#8
Originally Posted by Grinchman View Post
I need this because my app in some time run function, which needs much free memory and I want prevent it uses if free RAM is not enought.
You still haven't defined "free memory".

The N900 has ~1GByte of "memory" with 256MByte as actual RAM capsules and the rest as swap on disk. The swap on my phone is typically not used at all, even after several days of usage, so it's possible to say that ~740MByte of memory is "free" no matter what.

So, if your function needs, say, 100MByte and 235MByte of capsule RAM is allocated, you have 20MByte of capsule RAM and 740MByte of swap left. Would you say that this is enough to run your function or do you need to have 100MByte of capsule RAM available?