Hardware characteristics

RAM memory

Series 40 devices use static memory allocation for Java. On most Series 40 devices, the maximum Java heap size is 2 MB for MIDlets running in the foreground and 2.5 MB for MIDlets running in the background.

Symbian devices use dynamic memory allocation for Java, meaning that the memory heap reserved for Java grows and shrinks dynamically based on memory consumption. Because of this, the values returned by the Runtime.totalMemory and Runtime.freeMemory methods can vary over time. Symbian devices support a maximum Java heap size of 32 MB.

Not all Java objects are stored in the Java heap. Some objects can also be stored in the host OS memory. For example, only the handle for an Image is stored in the Java heap, while the actual bitmap is stored in the host OS memory. This can cause a discrepancy between the value returned by the Runtime.freeMemory method and the actual free RAM on the device. It is possible that an OutOfMemoryError is thrown even when it seems that the object should fit in the Java heap.

From S60 3rd Edition onwards, you can also use the com.nokia.memoryramfree system property to query the amount of free RAM on the device. This system property is not supported on Series 40 devices.

Series 40 devices support a maximum JAR size of up to 2 MB. Symbian devices support an unlimited JAR size.

To find out the maximum Java heap size and JAR size of a device, see Nokia Developer device specifications.

Note: Some devices also impose a maximum size for content to be downloaded to the device. On many devices, the maximum download size for any content is smaller than the maximum allowed application size. This means that users may be able to install larger applications via, for example, PC Suite than what they are able to download over the air.

Memory card removal

All noncritical applications, including MIDlets, are closed when the user removes the memory card. The MIDlet is closed regardless of the drive on which it is installed or the state of phone memory or memory card.

Graphics memory

Many Symbian^3 and newer Symbian devices use graphics hardware acceleration, for example when using 3D graphics APIs. These devices have 32 MB of high-speed dedicated graphics memory. Graphics memory management is handled automatically for MIDlets, but mixing 3D graphics, 2D graphics, and text is not recommended. Otherwise graphics memory consumption increases and performance suffers. If the MIDlet needs to use several different elements, it is recommended that the 3D graphics and video are shown in full screen, and the 2D graphics and text elements are kept small and fixed-size. For more information, see section Graphics hardware acceleration.