Sun Microsystems J2ME manual Heap Size, Storage and Cleaning

Models: J2ME

1 134
Download 134 pages 62.02 Kb
Page 45
Image 45

4.3.2Heap 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.3Storage 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.

Chapter 4 Using the Emulator 33

Page 45
Image 45
Sun Microsystems J2ME manual Heap Size, Storage and Cleaning