I am testing my app in two different devices. My app is relies heavily on images(allocating and deallocating). I know I have a leak but I am just curious why I observe this.
The behavior between the two devices is different. Device A crashes after 4 cycles of switching between views and Device B after 10 cycles, yet Device A has more free memory than Device B.
Device A: Device B:
Type iPhone 3G 16GB iPhone 3G 8GB
Capacity 14.64GB 7.08GB
Audio 5.32GB 1.18GB
Video 48.8GB -
Photos 267.3GB 46.8GB
Apps 1.08GB 505.5MB
Other 343.9MB 370.7MB
Free 7.60GB 5.0GB
Any insights why this is the case?
I am not sure if I understand this correctly, but the figures on the last row (7.6/5 GB) refer to available flash memory, not to the RAM. Therefore they say nothing about the expected performance of a memory-intensive application. Neither the amount of free RAM is exactly telling, because the system will start killing large applications when the memory is scarce and the amount of free memory will go up.
Related
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.
My application requires at least 40MB of RAM, so earlier iPhones (like 3G, first iPod touch versions) just do not have it (they have max about 20MB for my app). Is there a proper way to disable installing it to 3G devices? I know UIRequiredDeviceCapabilities, but it does not have parameter for minimum available memory.
First, are you sure that your application actually uses 40 MB of RAM on the older devices? I've found (by using the Memory Monitor instrument) that the same application uses less RAM on my iPhone 3G than it does on my iPhone 4 or iPad. The latter two devices have more pixels within their interfaces, so my application chews up more memory when running on them.
If it does, figure out if you can optimize memory usage to get it within a safe (< 30 MB) range for the older hardware. If you can do this, I think you'll see an across-the-board performance improvement in your application, even on the newer hardware.
Finally, if you absolutely cannot run on an older iOS device, I'd recommend using the UIRequiredDeviceCapabilities keys armv7 or opengles-2. Either will filter for the newer (iPhone 3G S and greater) hardware. While not keyed on memory size, the iPhone 3G S launched with significantly more RAM than the older models, and not a device since has had less. It's hard to imagine Apple reducing this specification at any point in the future.
How many bogomips (or any other relevant unit) can an iPhone or iPod touch deliver?
Is performance in larger applications, as on normal PCs, more limited to cache thrashing than to number of CPU instruction? Or is there some other limit?
What is a recommended total polybudget for a state-of-the-art game in a plain iPod touch (i.e. not iPhone 3GS)?
Does the ARM-11 in the iPod touch and the Samsung ARM in the iPhone have an FPU with the same performance as that of a normal PC, scaled to the core clock frequency?
The reason I'm asking is that I want to port a game with a physics engine (i'm using ODE). If you know anything else I should look out for, don't hesitate to mention it!
GLBenchmark has published a series of benchmarks for various mobile devices, including the iPhone, iPhone 3G, and iPhone 3GS. For example, the iPhone 3G appears to be capable of rendering 687,000 smooth shaded triangles per second (the best I've actually been able to get in my application is 460,000).
In regards to the CPU, the ARM processor on the iPhone has native floating point support, and even has a vector floating point unit. In comparison to a desktop, I ran a computationally intensive operation (NSDecimal addition) on both my desktop (in the iPhone simulator) and on the device (non-3G iPhone). The desktop (MacBook, white, 2.0 GHz Core 2 Duo) did 3344593 operations per second, where the iPhone did 281555. The desktop, which scored 2.64 Gflops on Xbench, was 11.88 times faster than the iPhone. Whether this means that the non-3G iPhone is capable of more than 220 Mflops would require more testing.
My iPhone app will download a large amount of data from a remote server. What is the maximum amount of data that an iPhone application can store? If you try to store too much data, what happens?
Like a computer, iPhone has RAM and hard disk space. The disk space is advertised on the box (8GB, 16GB, or 32GB). Apple does not advertise the amount of RAM, but the iPhone and iPhone 3G have 128MB and the 3GS has 256MB.
If you fill up memory, your app will receive a Memory Warning notification. If you don't free up enough memory, your app will be terminated.
If you fill up the disk, your app will probably receive disk full errors when you try to write more data.
See this excellent article on memory on the iPhone.
When you first buy an iPhone it will say 8GB, 16GB, 32 GB, or 64 GB on the package. Usually they use 3 GB for something that I don't really know what for. My iPhone 4S has 64 GB on the package but on the usage settings it says that I have 62 GB still a lot but I think that apple uses some GB for some kind of settings. I Hope this Helped :)