×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    Nov 2003
    Posts
    29

    How to free the memory

    Hi Everyone! I'm developing a game for S_40 , and I run into the problem with memory ,
    I have 20Kb of graphics , and 37Kb total .jar file size , my code spawned just a few objects ( not so-o big - I hope ) ,yet I got "Out of memory" message from Nokia_7210 Emulator ,Please consult me , what options do I have to free the memory effectively ?

  2. #2
    Regular Contributor
    Join Date
    Jun 2003
    Posts
    75
    maybe is bcoz of heap memory problem, an image with small file size didnt mean small heap file. heap file is decided by ((imageWidth * imageHeight * 2) + XXX) which i also dunno what is "XXX"

  3. #3
    Registered User
    Join Date
    Oct 2003
    Posts
    30
    be aware of the fact that the heap memory required by images does not anything related to its size in jar. eg. a 128x128's image would occupy (128x128x2+6x) bytes of heap memory but it may only be 3k in a jar file.

    Therefore, be sure there's not too many images are loaded at the same time...s40 normally have about 2xxKB heap memory(always assume 200KB heap memory would make your games runnable on most s40 mobiles).

  4. #4
    Registered User
    Join Date
    Nov 2003
    Posts
    29
    Thank you - friends! I understand things much better now!

Posting Permissions

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