Out of memory with almost all midlets

Started by
2 comments, last by trojanman 16 years, 2 months ago
Hello everyone, I just got a Nokia 2760 and a bluetooth dongle for it but most games I download in the internet give me an OutOfMemory error. I was checking the specs for the phone and apparently it has a 600k heap size while other phones have 1 or 2mb. Is that the problem? If so, is there a way to increase the heap size? By the way, I'm not using Nokia Application Installer to install the games. Does that make a difference? My phone specs(found this site): Nokia 2760 specs Thanks in advance, Victor Freire
Advertisement
Quote:Original post by Alpha Nox
Hello everyone,

I just got a Nokia 2760 and a bluetooth dongle for it but most games I download in the internet give me an OutOfMemory error.


What application? Where did you get it from? Was it designed for that series of phone (Nokia S40 5th edition)?

Quote:Original post by Alpha Nox
I was checking the specs for the phone and apparently it has a 600k heap size while other phones have 1 or 2mb.

Is that the problem?

According to the MIDP docs and OutOfMemoryError is: Thrown when the Java Virtual Machine cannot allocate an object because it is out of memory, and no more memory could be made available by the garbage collector.

That said, your application probably was not designed to run on a lower heap phone and is causing the problem. Did you try and run the application with the Nokia SDK emulator? Have you ran it with the Sun WTK and ran with the memory profiler on to see what the maximum memory used was?

Quote:Original post by Alpha Nox
If so, is there a way to increase the heap size?

No.
Quote:Original post by Alpha Nox
By the way, I'm not using Nokia Application Installer to install the games. Does that make a difference?

No.

Hey trojanman, thanks for replying.

After downloading more games and applications I'm almost sure it is because they aren't designed for my phone. The ones I got that were specifically designed for the S40 series ran perfectly.

I got them from several different websites by searching on google. I recently downloaded the Nokia SDK so I'm going to test them with it just for curiosity.

I initially thought that any phone with the newest MIDP would run every J2ME.

Anyway, about the heap size, where does the phone get the heap? If it comes from the internal memory, shouldn't it be theoretically possible to modify the ROM to increase the heap size?

Thanks for helping out,

Victor Freire

Quote:Original post by Alpha Nox
Hey trojanman, thanks for replying.

After downloading more games and applications I'm almost sure it is because they aren't designed for my phone. The ones I got that were specifically designed for the S40 series ran perfectly.


I got them from several different websites by searching on google. I recently downloaded the Nokia SDK so I'm going to test them with it just for curiosity.

I initially thought that any phone with the newest MIDP would run every J2ME.

Unfortunately for J2ME, Java's "Write Once Run Anywhere" has become "Write Once Debug Everywhere". Handset specifications, J2ME implementations and heap/CPU speed differences make it impossible to write a single product that will work everywhere.

Quote:Original post by Alpha Nox
Anyway, about the heap size, where does the phone get the heap?

The heap is determined by the handset manufacturers and specified in the Firmware of the phone. The handset has the plain ole' java heap and large array memory that is shared between applications on the handset. The two of those values comprise the total amount of shared memory that is present on the phone.

Quote:Original post by Alpha Nox
If it comes from the internal memory, shouldn't it be theoretically possible to modify the ROM to increase the heap size?

No. The heap you see is what you get.

This topic is closed to new replies.

Advertisement