How much memory (RAM) can be allocated by an App on Blackberry
we are planing an app for blackberry app world and will have to load lots of textures and audiofiles. so we need to 开发者_JAVA技巧know how much memory the app can really allocate for a smarthphone with 64MB (RAM)
thx for answers!
You can also check available memory before load:
MemoryStats.html#getFree() - Amount of memory/strorage free
Memory.html#getFlashFree() - Bytes of free flash
FileConnection.html#availableSize() - The available size in bytes on a file system
You can try to allocate as much memory as you need. If there isn't enough available, it will throw an OutOfMemory runtime exception when you try to allocate memory. That said, I don't think your app would be a good "citizen" on the phone if it tries to grab all available RAM.
精彩评论