Skip to main content

Images, MutableImages & OutOfMemory

4 replies [Last post]
selenau
Offline
Joined: 2006-10-11
Points: 0

Hi,

I'm using "Google Mobile Maps" on phoneme_feature_mr1 successfully with 320x240.

But when I switch to a 640x480 I got OutOfMemory errors on console and images on screen blinks.

I saw this table
http://java.sun.com/javame/reference/docs/sjwc-1.1.3-web/pdf-html/port/r...

and changed values on constant.xml, constant_open.xml, constant_fixed.xml, but got the same result.

Any clue? Thanks...

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
aka1278
Offline
Joined: 2006-10-18
Points: 0

Hi,

Could you provide more details about some of your build options that affect resource counting:
1) Do you use open limit policy (the default) or fixed one (building with USE_FIXED=true flag)?
2) Do you use SVM mode (the default) or MVM (you use ENABLE_ISOLATES=true to build CLDC when use USE_MULTIPLE_ISOLATES=true to build MIDP)?

Anyway, have you changed memory limits for java heap?
If not, please increase JAVA_HEAP_CAPACITY_SVM if you are building for SVM mode or JAVA_HEAP_CAPACITY_MVM for MVM mode.

Please let me know if it fixes the problem.

WBR, Alexey.

selenau
Offline
Joined: 2006-10-11
Points: 0

I rebuild all parts again but same problem occurred.

1) Open policy. (no USE_FIXED flag)
2) SVM mode, no ENABLE_ISOLATES or USE_MULTIPLE_ISOLATES.

constant.xml
On my last try I gave JAVA_HEAP_CAPACITY_SVM a value of "(32*1024*1024)".

constant_open.xml
Name="IMAGE_MUT_GLOBAL_LIMIT" Value="16000000"
Name="IMAGE_IMMUT_GLOBAL_LIMIT" Value="13000000"

Still same.

aap031
Offline
Joined: 2006-10-18
Points: 0

Hi!

If you are using Java AMS (no USE_NATIVE_AMS=true flag) there is one more place which you should take care of to increase the heap size. That is
midp/src/ams/example/jams/native/
/runMidlet.c

There is MIDP_HEAP_REQUIREMENT value which actually is a size of heap requested

Regards,
Andrey

selenau
Offline
Joined: 2006-10-11
Points: 0

It worked :)

Thank you.