On a separate thread I demonstrated my ignorance of memory types by asking about the best way to copy a file into "internal memory" and was advised that this was not a good idea and that it would be better to read the file into "RAM". I am now trying to understand how these two types of memory are related and how they can be used.
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.
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 Android Reference for Data Storage mentions "Internal Storage". This is a place where "you can save files". The page also mentions SQLite database files which I think can be stored in the "Internal storage". 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.
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? If so, where in the Android documentation is this explained?
There are basically two kinds of internal memory: ROM and RAM.
RAM is the part of the phone that is used to store the operating system (OS) and where apps and data currently in use are kept. Whereas, phone storage is used to store data such as apps, photos, videos, and files that are necessary for the phone to run.
Storage and memory are both important for your computer. If you have a disk with larger storage capacity, you can store more files and programs on your computer. And with more RAM, your computer can manipulate larger digital data and run faster. Is 8 GB of memory enough?
In the mobile phone, RAM refers to the mobile phone memory, which belongs to the internal memory of the mobile phone. It belongs to the random storage and is faster than the ROM. It plays an important role in the performance of the mobile phone. In addition, after the power is turned off, the data is cleared.
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:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With