OutOfMemoryError

Hi everyone

I have an annoying problem to which I couldn't find an answer in either the doc or on the internet. When executing the following line of code, I always end up with an OutOfMemoryException.

short[] prev =newshort[32768];

I am using WTK 2.2. The application is using about 110K of Memory (from 500K available). Is there an upper bound for short arrays in CLDC? Any idea?

Cheers, Phibo

[527 byte] By [Phiboa] at [2007-10-2 16:50:24]
# 1
most devices have indeed an maximum size per object.
deepspacea at 2007-7-13 18:01:59 > top of Java-index,Java Mobility Forums,Java ME Technologies...
# 2
> most devices have indeed an maximum size per object.Do you know the maximum size per object in the WTK emulator? Is there a possiblity to (re)set this limit?
Phiboa at 2007-7-13 18:01:59 > top of Java-index,Java Mobility Forums,Java ME Technologies...
# 3
I havn't got a clue, but I bet it's configurable.But what's the use if you get it working on the WTK, but not on the device. What do you need a 32 KB array for anyway?
deepspacea at 2007-7-13 18:01:59 > top of Java-index,Java Mobility Forums,Java ME Technologies...
# 4
woops, make that 64 KB ;)
deepspacea at 2007-7-13 18:01:59 > top of Java-index,Java Mobility Forums,Java ME Technologies...