Android的存储器类型(RAM V内部存储器) [英] Android memory types (RAM v Internal Memory)

查看:274
本文介绍了Android的存储器类型(RAM V内部存储器)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在一个单独的线程我问要复制的最好的方式证明了我的记忆类型的无知一个文件到内存和被告知,这不是一个好主意,这将是更好的文件读入到RAM。我现在想了解这两种类型的内存是如何关联的,它们如何使用。

据我所知,内部存储器被认为是用来存储的APK,ROM图像等闪光灯。

该规范对我的HTC Hero说有。ROM:512MB,RAM:288MB,没有指示的RAM是如何被划分

在手机设置 - >SD&放大器;手机内存。网页仅仅指的是SD卡和手机内部存储,并为后者只显示了一种量可用空间

Android的参考数据存储提到了内部存储。这是一个地方,你可以将文件保存。该页面还提到,我认为可以存储在内部存储的SQLite数据库文件。然而,网页似乎并没有提供细分的内部存储和另一个(presumably更加动态)类型的RAM的任何解释。

是否有某种的总内存(288MB的英雄)的动态划分为两个子分部它们以不同的方式使用吗?如果是这样,在Android的文件中是这样解释的?

解决方案
  

据我所知,内部存储器被认为是用来存储的APK,ROM图像等闪光灯。

     

该规范对我的HTC Hero说有。ROM:512MB,RAM:288MB,没有指示的RAM是如何被划分

RAM没有任何形式的永久性基础上的细分。 RAM用来通过在需要的基础上运行的进程。对于SDK应用程序需要注意的最重要的事情是,有一个上限为多少RAM进程可占用 - 你的英雄,应该是16MB

  

在手机设置 - >SD&放大器;手机内存。网页仅仅指的是SD卡和手机内部存储,并为后者只显示了一种量可用空间

在手机内部存储是指板上闪存空间预留为APK文件,数据库,preferences,和其他本地文件的部分。

  

该网页还提到,我认为可以存储在内部存储的SQLite数据库文件。

正确的。

  

不过,页面似乎并没有提供细分的内部存储和另一个(presumably更加动态)类型的RAM的任何解释。

RAM具有无关内部存储

  

是否有某种的总内存(288MB的英雄)的动态划分为两个子部门哪些是可用以不同的方式?

没有。


让我们退后一步一个脚步。

RAM是RAM的内存。在您的手机内存是不是比你的台式机,笔记本,上网本等,这结构已经在过去的几十年中保持相对稳定的使用,特别是一旦我们从大型机逃脱RAM显著不同。正在运行的程序(OS和最终用户应用程序)消耗的RAM,但只有当它们正在运行。而RAM被消灭在重新启动后,在手机上不亚于桌面上。

现在,一般的台式机,笔记本或上网本还拥有硬盘更持久的存储比RAM的优惠。没有绝对的期限为等值的机器人 - 我倾向于使用机载闪存存储的话,其他人称之为内部存储,但正如你所看到的,后者的任期是充满了混乱。就像一个硬盘,板载闪存用于OS(又名,固件Android的),最终用户程序(又名,在安卓APK文件)和最终用户数据(即,数据库,共享preferences,和其他文件存储其中, getFilesDir()的位置)。

板载闪存存储分为几个分区。如果你是一个Windows用户,分区基本上是说你的硬盘分成C:,E:和F:驱动器。在Android中,一个分区是专门为固件和另一个分区(以下简称数据分区)是专门为最终用户程序和数据。 (注:preceding描述不完全准确,但差异是远远超出了这个答案的范围)

因此​​,所有考虑到这一点:

  • 您的512MB的ROM是​​主板上的闪存存储,hearkening回到老闪存ROM一词
  • 您的手机内部存储的设置,它的最终用户的应用程序和数据(为什么我不使用这个词来指板上闪存作为的原因之一是数据分区的可用空间全)
  • 您SD卡被更一般地称为在Android作为外部存储,这在许多设备是某种形式的SD卡,但它实际上可能是被指定为在服务于板上闪存存储的只是另一个分区外部存储的作用

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?

解决方案

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

这篇关于Android的存储器类型(RAM V内部存储器)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆