Android memory types (RAM v Internal Memory) Android memory types (RAM v Internal Memory) android android

Android memory types (RAM v Internal Memory)


I understand that "internal memory is perceived to be the flash that is used to store APKs, ROM images, etc."

The specification for my HTC Hero says that there is "ROM: 512MB, RAM: 288MB" with no indication of how the RAM is subdivided.

The RAM is not "subdivided" on any sort of permanent basis. RAM is used by running processes on an as-needed basis. The biggest thing for SDK apps to note is that there is an upper bound as to how much RAM a process can consume -- on your Hero, it should be 16MB.

On the phone the "Settings"->"SD & phone storage" page simply refers to "SD card" and "Internal phone storage" and for the latter just shows one amount for "Available space".

The "Internal phone storage" refers to the portion of on-board flash space set aside for APK files, databases, preferences, and other local files.

The page also mentions SQLite database files which I think can be stored in the "Internal storage".

Correct.

However, the page doesn't seem to offer any explanation of the sub-division of RAM between Internal Storage and another (presumably more dynamic) type.

RAM has nothing to do with internal storage.

Is there some kind of dynamic division of the total RAM (288MB on the Hero) into two sub-divisions which are usable in different ways?

No.


Let's step back a pace.

RAM is RAM is RAM. RAM on your phone is not significantly different than RAM on your desktop, your notebook, your netbook, etc. This construct has remained relatively stable in its use for the past few decades, particularly once we escaped from the mainframe. Running programs (OS and end-user apps) consume RAM, but only while they are running. And RAM gets wiped on a reboot, on phones as much as on your desktop.

Now, your average desktop, notebook, or netbook also has a hard drive for more permanent storage than RAM offers. There is no absolute term for the equivalent in Android -- I tend to use "on-board flash storage" for it, others call it "internal storage", though as you will see, the latter term is fraught with confusion. Just like a hard drive, on-board flash storage is used for the OS (a.k.a., firmware in Android), end-user programs (a.k.a., APK files in Android), and end-user data (a.k.a., databases, shared preferences, and other files stored where getFilesDir() is located).

The on-board flash storage is divided into a few partitions. If you're a Windows user, partitions is basically saying "your hard drive is broken into C:, E:, and F: drives". In Android, one partition is dedicated to firmware, and another partition (the "data partition") is dedicated to the end-user programs and data. (NOTE: the preceding description is not entirely accurate, but the discrepancies are well beyond the scope of this answer).

So, with all that in mind:

  • Your 512MB of ROM is the on-board flash storage, hearkening back to the old "flash ROM" term
  • Your "Internal phone storage" in settings it the available space in the data partition for end-user apps and data (one of the reasons why I don't use this term to refer to the on-board flash storage as a whole)
  • Your "SD card" is more generically referred to in Android as external storage, which on many devices is some form of SD card, though it could actually be just another partition of the on-board flash storage designated as serving in the role of external storage