• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How to get out of 'OutOfMemoryError' ???

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi !
I get [b]'java/lang/OutOfMemoryError'[\b] in my midlet when I try to run it from Motorola's i88s device. Size of my jar file is 52.6 KB. I get following warning when the application is installed using Motorola iDEN SDK/Emulator:
[i]Install Succeeded!
Occupied Flash Memory: 172508 bytes
Occupied Data Space: 1833 bytes
Warning: The size of this jar file is 53881 bytes (52.6KB). It is larger than the soft limit of device i88s, which is 51200 bytes (50KB)!
[\i]
I think if my application would have been of smaller size, under 50KB, it would have worked. But the application is already optimized with obfuscation tool and I can not really reduce it any further.
Is there any way to solve this problem?
Thanks in advance.
~Vai
 
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Rather than focusing on the JAR size, I would focus on reducing the heap memory required by your program when running. Don't create so many objects.
The J2ME Wireless Toolkit's memory profiler can be helpful for tracking down the main memory hogs. In KToolbar, go to Edit -> Preferences -> Monitoring, and check "Enable Memory Monitor". (This is in version 1.0.4.)
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic