×

Discussion Board

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

    Strange "Out of memory"-error on 7210-emulator...

    I hope someone could help me with my strange problem:

    My program is now 57kb as jar-file; the class-files are 126kb in sum + about 8kb for graphics + mabye 20kb for variables.

    When i launch the class-file in the 7210-emultor everything works perfect. But when i create a jar-file and try to launch it on the 7210-emultor it tells my "Out of memory".

    I already tested, that there are still about 18kb free until the emulator creates the same errormessage with using the class-files for starting.

    Does the 7210 need more memory when it executes the jar-files instead of the class-files? What information is correct for the "real" Nokia 7210? I cannot test it on the real device, because i dont have a 7210...

    Thats very confusing; i hope someone can help me...

    Thanks in advance!

  2. #2
    Super Contributor
    Join Date
    Jun 2003
    Location
    Cheshire, UK
    Posts
    7,395
    In general, I find that memory usage on the 7210 emulator (running from a JAR) is similar to my 6100 phone. So I'd say that if it doesn't load on the emulator, it won't work on the real thing (or may not work on some other Series 40 devices, as they don't all have exactly the same heap size). It might be worth increasing the heap size in the emulator to see how far short you are.

    You may need to reduce the memory requirements of your application. Everything in Java tends to take more memory than you think! Are your classes obfuscated?

    Graham.

  3. #3
    Registered User
    Join Date
    Mar 2003
    Posts
    3
    Thanks for your help to answer. :-)

    But i guess, that the problem may be some other, as i made severall tests last night (in fact I didnt went to slepp since 8:00am...)

    When I reduced the class-files for about 3kb, the programm also worked as *.jar-file on the emulator. Then i addes 10kb of useless arrays and tried it again... then it worked too.

    Confusing is, that the programm should use now 7kb more heap and runs without problem. So it cant be a problem of heapmemory, can it?

    Do you know if there are any limitations concerning class-files size? Is there a maximum value for a single class or for all classes together?

    I am already using the Nokia 3300-emulator to check the free memory for the applications. When I increased the heapsize from 210kb to 220kb it also worked with the non-sourcecode-reduced version...

    How much heap does the emulator need to build up 3kb of "class"-files?? It cant be that he needs more than 10kb heap to build up 3kb class-files? Or does he??

Posting Permissions

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