×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    Mar 2003
    Posts
    7

    resource limit size

    Hi,
    My questions is about series 40 heap size:
    1. What is the maximum heap size available in J2ME application?
    2. Is there a limit for number of resources I can create in run time?
    3. Assuming I create only one resource for example: MIDI file, what is the maximum size this file should be? I manage to play 60K MIDI but 70K I couldnt.

    Thanks,

    Gil.

  2. #2
    Super Contributor
    Join Date
    Mar 2003
    Location
    Israel
    Posts
    2,280
    Heap size on most S40 phones is around 200k (+-). That includes not only resources, but also the classes loaded and objects created. So the max size for a resource depends on the actual size of your code.

    shmoove

  3. #3
    Registered User
    Join Date
    Mar 2003
    Posts
    7

    resource limit size

    Ok,
    So how can you explain the MIDI file problem I had.
    The class's size is 4K and the MIDI file was 70K. According to your
    statment, I should have manage to play this MIDi file, but instead I got : "out of memory" error message.

    Thanks

    Gil.

  4. #4
    Registered User
    Join Date
    Jul 2003
    Location
    Finland, Tampere
    Posts
    1,113
    gilch
    The class's size is 4K and the MIDI file was 70K

    This has nothing to do with the actual amount of heap space taken.
    Try tracing memory usage using Runtime object.
    You can also enable emulator tracing options and see how much space classes take

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×