I've noticed that e.g. the Samsung Galaxy S allows apps to allocate much more memory (>24Mb) than a Droid (<=24Mb) or a G1 (<=16Mb) before OutOfMemoryExceptions are thrown. I'd like my app to scale to higher e开发者_运维知识库nd devices like the Galaxy and take advantage of the higher allocation limit.
Is there a reliable way to detect how much memory my app can use? Is it risky to attempt to use e.g. 70% of the maximum memory reported? Otherwise, I'd need to limit my app to what the G1 allows to guarantee my app won't crash.
精彩评论