Brew Question:

What is the size limit for an applet?

Tweet Share WhatsApp

Answer:

The size of a BREW applet is limited by the amount of free file system space that is available, and by the amount of available RAM.

BREW applets, when executed, are loaded into RAM; any RAM left over can be used for memory allocation, loading resources, creating controls, etc. How much RAM is available depends on the type of phone, and its configuration. On a QCP-3035, for instance, the available RAM is 90K, 30K of which belongs to BREW and other phone related tasks, leaving 60K available for use by an applet. The memory available on each of the phones running BREW is available here.

Another limiting factor for applet size is heap fragmentation. If the largest available memory block is smaller than the size of the applet, then the applet will not be loaded. Use IHEAP_CheckAvail() to determine whether a memory block of sufficient size can be allocated. IHEAP_GetMemStats() can be used to determine the amount of RAM already used. If you have an applet that is too large for a particular device, a work-around is to split the application into multiple applets. Memory Allocation provides more information on how to avoid heap fragmentation.

Download Brew PDF Read All 78 Brew Questions
Previous QuestionNext Question
How does the memory architecture in BREW work?Why cant an applet be run directly from flash RAM?