1

A general question to make sure I understand or not the memory in an Android Phone. You have the OS using memory (FLASH/ROM) which is usually partitioned as either a .5,1,2,4GB depending on the phone. The developer doesnt have access to this unless rooted.

That OS partition is carved from an on board FLASH of lets say from 8GB. From that 8GB a partition is set aside for apps/apks... maybe from one to two GB. The remainder is set aside as DATA storage area in the FLASH for the user to store whatever and where the UserPrefs get stored.

Question one. As an application is running various objects/items get created and accessed and possible written thousands/millions of times. FLASH is too slow for this so there has to be some RAM that comes into play. Is that the 16MB number I see talked about? Is this where cache is?

Question Two. I have routines/methods that tell me external SD free available and I have routine that seems to show FLASH/ROM available for app storage. But I see another number being displayed in settings that mentions RAM. How do I find how much is available?

Question three: My goal is to store a handful of 500k images , first check to see if SD is available and writable store there. If not store internally until an SD card can be mounted (if can be). If there is a RAM area how do I access it and tell if I have enough room to store temporarily?

  My current understanding of Android internal memory layout/map/arrangement
  8GB FLASH/ROM installed.
   OS partition uses 1GB
   App/Apks storage uses 2GB
   Data Storage uses remainder 4.5GB, SQlite Db is store here.

   RAM is where??
   Cache is where??
user1445716
  • 442
  • 6
  • 18

1 Answers1

0

The 16MB number is probably just the heap space that is allocated to an app. Not the RAM that the device has. Just with a quick search on SO, I've found Android Heap Size on Different Phones and How To Check Availability of External Storage Space

Community
  • 1
  • 1
Morrison Chang
  • 11,691
  • 3
  • 41
  • 77
  • Okay. So Cache is also stored in the flash/Rom and there is no ram as in dynamic ram (except maybe for a GPU). The answer links you provided were helpful. They provided how much I can and should use. Which of course leaves the obvious question of As I am running what code do I use to find out how much memory I am using? – user1445716 Jul 09 '12 at 05:15
  • Are you talking abou how much memory your bitmap will use in your app? Do you intend to show the images on the device or just move them around (say download from cloud and only show a smaller thumbnail)? – Morrison Chang Jul 09 '12 at 05:41
  • If I know what memory class I am in thats good. But that figure doesnt tell me what my current app usage is. And thats the final piece I need to know so I can choose how to lessen or control the apps memory usage. So how much of the heap am I using I guess is the question? – user1445716 Jul 09 '12 at 08:13