2 heap size, 3 storage and cleaning, Heap size – Sun Microsystems J2ME User Manual

Page 45: Storage and cleaning

Advertising
background image

Chapter 4

Using the Emulator

33

4.3.2

Heap Size

The heap is memory where your application’s objects are stored. Many real devices
have limited heap size. You can set a maximum heap size to more closely simulate
the conditions on a real device. Choose Edit > Preferences... from the KToolbar
menu and selecting the Storage tab. Fill in the maximum heap size in the Heap
Size

field. Remember, one kilobyte (kB) is 1024 bytes.

If you don’t specify a heap size, the default is 2 megabytes.

FIGURE 18

The storage tab of the KToolbar preferences

4.3.3

Storage and Cleaning

The emulator has persistent storage, which by default is placed in
{toolkit}

\appdb\

{skin} in files with a

.db

extension. For example, the persistent

storage for the

DefaultColorPhone

emulator skin is stored in

{toolkit}

\appdb\DefaultColorPhone

. There is no limit on the size of the

persistent storage.

Note –

If multiple instances of the same emulator skin run simultaneously, the

J2ME Wireless Toolkit will generate unique file paths for each one. For example, a
second instance of

DefaultColorPhone

might have a file path name of

{toolkit}

\appdb\DefaultColorPhone.1089982856218

.

Advertising