Re: [J2ME]How to avoid memory fragmentation

From: Darryl L. Pierce (mcpierce_at_gmail.com)
Date: 11/28/04


Date: Sun, 28 Nov 2004 08:28:10 -0500

DNass wrote:
> I have developped a mobile app,
> and I'm actually trying to deploy this app
> on a Sony Ericsson T610.
> On the emulator it works just fine, but on the mobile
> I have this system error message saying "this application is
> using too much memory", I know that the app uses about 150k of RAM
> and the mobile has 260 k
> there for I thougth it was due to
> a problem with the memory fragmentation.
> I was wondering if somebody here had the same problems
> and if yes could she/he share his experience
>
> Thx in advance
>
> PS: the app make connections to server via http
> to retreive informations (text and/or images)

The mobile may have 260k, but remember that some of that is going to be
taken up by the ROM image of your application. So, if you're using 150k
of heap, you're only leaving 110k for the ROM image and stack space,
which isn't very much at all. Emulators based on the WTK always have
512k for their heap so you're hard pressed to use up their memory.

I would say first off go through your code and reduce that heap usage.
What are you using 150k for? Seems that you should put some of that data
into RMS or else let it go 'cause that's way too much for almost any
handset to handle.

-- 
Darryl L. Pierce <mcpierce@gmail.com>
Visit my webpage: <http://mcpierce.multiply.com>
"By doubting we come to inquiry, through inquiry truth."
     - Peter Abelard


Relevant Pages

  • Re: Portable Database Choice
    ... > database alternatives and did find the options below from this search. ... One app requires ... > push of data from the desktop to mobile. ... > Both of these apps used Pocket Access on the device with Peter Foot's ...
    (microsoft.public.dotnet.framework.compactframework)
  • Re: Portable Database Choice
    ... How long did it take to move from Pocket Access to SQLite ... Program Manager, Windows Mobile Developer Experience ... One app requires ...
    (microsoft.public.dotnet.framework.compactframework)
  • Re: Portable Database Choice
    ... I searched this group quite a bit looking for database alternatives and did find the options below from this search. ... I'm posting this in the hope it can be of use to other developers in a position similar to mine where I needed a low cost alternative to Pocket Access. ... One app requires synchronization between desktop and mobile device, the other requires a push of data from the desktop to mobile. ...
    (microsoft.public.dotnet.framework.compactframework)
  • Re: Advice Offline/Online
    ... Welcome to the world of mobile computing. ... There's no way to run a web app "disconnected" on most mobile ... online when a wifi connection is available and offline when one isn't. ... framework for the palm OS. ...
    (microsoft.public.pocketpc.developer)
  • Re: Forcing a Large Object Heap allocation
    ... I am working on an app that MUST be responsive at all times. ... hit of allocating on the LOH and avoid the "compacting" phase all together. ... The LOH has been described as being more similar to the C++ heap, ...
    (microsoft.public.dotnet.framework.clr)