Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to Increase heap size in Java ME?

Is there any way to increase the heap size for Java ME on a device? I'm developing an application for a Nokia N95, but am bumping into memory issues when I try to do image processing of larger images. The phone has plenty of heap space available, but seems to restrict the amount allowed to be used by Java ME to 1MB.

like image 314
Cory Avatar asked Dec 13 '25 23:12

Cory


1 Answers

Short answer: No.

Longer answer: Heap-size is hardcoded in device VM. If you are running out of memory you need to split you task into more smaller sub tasks to allow GC to kick in. With limited memory only limited operations are possible. You figure...

like image 128
Honza Avatar answered Dec 15 '25 22:12

Honza



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!