• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to get out of 'OutOfMemoryError' ???

 
Vaibhav Sanas
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • 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
 
Liam Quinn
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • 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.)
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic