views:

135

answers:

2

Hi guys, we are planing an app for blackberry app world and will have to load lots of textures and audiofiles. so we need to know how much memory the app can really allocate for a smarthphone with 64MB (RAM)

thx for answers!

+1  A: 

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.

Marc Novakowski
+1  A: 

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

Max Gontar