I am creating a new AVD within Eclipse, Android dev. tools 21.0, and it would be great to have some explanation on
"Memory Options" (RAM and VM Heap), "Internal Storage" , and "SD card".
(I am sorry but since I am a new user I am not allowed to post a snapshot image)
I would need:
- the meaning
- the unit of measure (for RAM and VM heap are not displayed)
- criteria to choose the values
Thanks
First to clear up some possible confusion, Eclipse doesn't exactly have its own AVD creation mechanism. It has a plug-in which calls the Android Vitrual Device Manager. The AVD Manager can also be accessed from the command line using "android avd", and comes as part of the Android SDK (so this question isn't specific to Eclipse users).
As for the definitions:
Internal storage
Built-in, non-removable file storage capacity. The operating system and most apps will be installed here. When you see a device advertised with 8GB or 16GB, this is what that number refers to.
The AVD Manager allows you to select Gigabyte or Megabyte.
The choice is up to your needs and the amount of space you have on your hard drive, but you'll probably want a bare minimum of 200MB. 2GB will probably be more than enough. If you run out of space you can always add more or move files to the SD card.
SD card
Similar to Internal storage, but refers to the storage an Android device would have access to on a removable memory card (the same kind of card digital cameras use). This is the place for storing user files, including documents, music and video, but some applications are built to be stored here.
The AVD Manager allows you to select Gigabyte, Megabyte, or Kilobyte.
Again, this uses space on your computer's hard drive, but this value is completely optional. You can safely leave this blank until you need to test how your app uses external storage.
Memory Option- RAM
Available working memory, used by the operating system and any running applications. This directly affects how many apps can be loaded at the same time.
The AVD Manager expects a value in MB.
This uses your computer's RAM, which is a limited resource so you don't want to use too much. I'd say the current range to play with is 256MB to 2024MB, so your sweet spot is likely either 512 or 1024.
Memory Option- VM Heap
This is a more advanced topic which is way out of scope of a beginner question. For simplicity's sake I'll just say that where RAM is related to the sum of running apps, Heap is related to an memory available to each individual app.
The AVD Manager expects a value in MB here as well.
For a reasonable value, refer to this question which lists real-world values: Android heap size on different phones/devices and OS versions
For much more information on memory, refer to the Android Developer site (http://developer.android.com/training/articles/memory.html)
Related
I have these related questions:
Does anybody know how an OS gets to know all hardware connected on the motherboard? (I guess this is called "Hardware Enumeration").
How does it determine what kind of hardware is residing at an specific IO address (i.e.: serial or parallel or whatever controller)?
How to code a system module which will do this job? (Assuming no OS loaded yet, just BIOS).
I know BIOS is just a validation and an user friendly interface to configure hardware at boot time with no real use after that for most modern OS's (win, Linux, etc). Besides I know that for the BIOS it should not be difficult to find all hardware because it is specifically tuned by the board manufacturer (who knows everything about it!). But for an OS or an application above BIOS that is a complete different story. Right?
Pre-PCI this was much more difficult, you needed a trick for each product, and even with that it was difficult to figure everything out. With usb and pci you can scan the busses to find a vendor and product id, from that you go into a product specific discovery (like the old days this can be difficult). Sometimes the details for that board are protected by NDA or worse you just dont get to know unless you work there on the right team.
The general approach is either based on detection (usb, pcie, etc vendor/product ids) you load a driver or write a driver for that family of product based on the documentation for that family of product. Since you mentioned BIOS, win, linux that implies X86 or a PC, and that pretty much covers the autodetectable. Beyond that you rely on the user who knows what hardware was installed in the system and a driver that came with it. or in some way you ask them what is installed (the specific printer at the end of a cable or out on the network if not auto detectable is an easy to understand example).
In short you take decades of experience in trying to succeed at this and apply it, and still fail from time to time since you are not in 100% control of all the hardware in the system, there are hundreds of vendors out there each doing their own thing.
BIOS enumerates the pci(e) for an x86 pc, for other platforms the OS might do it. The enumeration includes allocating address space for the device based on pci compliant rules. but within that address space you have to know how to program that specific board from vendor documentation if available.
Sorry my English is not very good.
Responding questions 1 and 2:
During the boot process, only the hardware modules strictly necessary to find and start the OS are loaded.
These hardware modules are: motherboard, hard drive, RAM, graphics card, keyboard, mouse, screen (that is detected by the graphics card), network card, CD / DVD, and a few extra peripherals such as USB units.
Each hardware module you connect to a computer has a controller that is like a small BIOS with all the information of the stored device: manufacturer, device type, protocols, etc
The detection process is very simple: the BIOS has hardcoded all the information about the motherboard, with all communication ports. At startup, the BIOS sends a signal to all system ports asking the questions "Who are you? What are you? How do you function?" and all attached devices answers by sending their information. In this way the computer knows how much RAM you have, if there is present a keyboard or a mouse, which storage devices are available, screen resolution, etc ...
Obviously, this process only works with the basic modules needed to boot the system, and does not work with complex peripherals that require specific drivers: printers, scanners, webcams ... all these complex peripherals are loaded by software once the OS has been charged.
Responding question 3:
If you wants to load a specific module during the boot, you must:
- Create a controller for this module.
- If the peripheral is too complex to load everything from the controller, you must to write all the proccess to control that module directly in the BIOS module, or reprogram the IPL to manage that specific module.
I hope I've helped
Actually, when you turn on your system, the BIOS starts the IPL (Initial program load) from ROM. For check the all connected devices are working good and also check the mandatory devices such as keyboard, CMOS, Hard disk and so on. If it is not success, it gives an error flag to the BIOS. The BIOS shows us the error through video devices.
If it is success, the control of boot is transferred to BIOS for further process.
The above all process are called POST (Power On Self Test).
Now the BIOS have the control. It checks all secondary memory devices for boot loader of the OS. If it hit, the bootloader's memory address is transferred to RAM.
The Ram started to execute the bootloader. Here only the os starts to run.
If the bootloader not hit, the bios shows us the boot failure error.
I hope your doubt clarified...
All I know is It helps in initializing processor hardware and operating system.
First I need to know what is a firmware and how it works.
Probably showing a list of firmware and what they do can be a good idea for explanation.
Typically, microprocessors performa start up process that usually takes the form of "begin execution of the code that is found starting at a specific address" or "look for a multibyte code at a pinpointed location and jump to the indicated locale to begin execution"
Since the introduction of IC ROM, with its many variants, including, but not limited to mask programmed ROMs, and programmable ROMs, and EPROMs. Since this time, firmware boot programs were shipped and isntalled on computers. Then the introduction of an external ROM was an italian telephone switching elaborator, called "Gruppi Speciali".
When a computer's turned off, it's software remains stored on nonvolatile data devices such as HDDs CDs DVDs SD cards, USBs, floppies, etc. WHen the computer's powere don, it doen't have an operating system or its lloader in RAM, it first of all executes a relatively small program stored in ROM, along with a small amount of needed data to access the nonvolatile device or devices from which the operating system programs the data and can be uploaded into RAM, this small program being known as a bootstrap loader.
I have read a lot of complaints and problems about Android Virtual Device (AVD) taking a lot of time to load, but people were often talking about just few seconds delays.
In my case, it takes about 15 minutes(!) to load, and even then it also freezes or reacts very slowly. I have already un- and reinstalled once, but nothing changed.
I also have problems with Eclipse, but I am going to post a separate question for it.
I am running it on a slightly old PC, with Intel Core Duo CPU, 2 GB RAM, plenty of HD space, Windows XP SP3.
Do you think the problem is in having too little RAM? Is there a log file somewhere that can help me in understanding what is going wrong?
Thanks
2GB RAM is not much, but you should be able to run the emulator with it. Try to close as much other programs as possible before starting the emulator.
It is my experience that the AVD startup time increases with the amount of virtual hardware you add to the AVD, so keep this simple. Also I noticed that Android 3.0 or higher AVDs can be rather sluggish in the emulator compared to the 2.x versions. However, their performance might improve if you increase the "Device ram size" and/or "Max VM application heap size" hardware properties (see also this post)
I found some other tips in this post but I didn't try them myself.
If you have Eclipse up and running you can check the logcat while the AVD is starting.
I am trying to find a NullPointerException that I get when in my app the phone release memory. I was testing on a Samsung G3, but now that I have change for a GS2 which has more RAM memory, the variable is still there when I minimaze/maximize.
Is there any way to simulate my old phone and his limited RAM memory? A bit ironic,but now I miss it...In the SDK emulators I can set SD card size, but not the RAM, which I guess is the key problem here.
There is a program on the android market called CPU Master. You can set CPU speed so then you can test your program as in a phone with limited resources.
I want to know the feasibility of these things:
1) Is it possible to download 200MB audio files to our application?
2) How much RAM can be accessed from an iPhone app? What is the largest amount of RAM an app can expect to use?
Anyone's help in this regard is deeply appreciated.
Thanks to all,
Monish
1) Yes, although you might make users angry who are not on Wifi + fast DSL. Also you will need to handle interrupted downloads.
2) No, since ARM is a 32bit processor a maximum of 4GB RAM can be addressed. Anyhow, iDevices have a maximum of 512MB right now (iPad 2). Your application will get killed by iOS if your app takes about 75% or so of the available RAM which means in reality you shouldn't use more than, say, 80MB of RAM. And if you need to address 8GB then your design is totally flawed to begin with.
There are always ways to work with a lot less (e. g. either by using better algorithms and/or by caching to disk). On the disk, you are only limited by the available space left on the device. So if you have an iDevice with just 8GB you're naturally out of luck as the system itself and other apps/data are reducing the available space. Same if you're on a 64GB iDevice which is packed with movies. You will need to be able to work with the space that is available. You can, for example, try to "reserve" the necessary space by creating a file and making it as big as you need it (via a seek and a write) but be prepared for angry customers.