I'm having a memory problem. Probably a stupid one. My program runs fine
on most Palms (mostly all emulated, of course), and I don't *think* its
size (290K) is the problem. The problem I am having seems to only happen
on 2MB OS 3.5 "EZ" devices (Palm IIIx, Vx, etc.)...The software is 3.5
or higher, and I'm essentially testing it on all the ROMs I can find.

In only those 2048K cases, it runs fine once, and then IF IMMEDIATELY
RUN AGAIN, it crashes trying to allocate its final bitmap (BmpCreate).
The error, however, is NOT memErrNotEnoughSpace, but instead
"sysErrNoFreeResources." If you run any other program (say, MemoPad) in
between launches, it allocates and runs fine. If you run it twice in a
row, whammo.

My memory debugging skills are kinda weak, and I'm running GCC on a PC,
so no CodeWarrior tools will help me. I am calling and checking
MemHeapFreeBytes and it looks the same at launch time as it does right
before my program closes, so I don't think I'm leaving anything
unclean....Although on a subsequent run of the program, the "max" free
chunk size is decreased somewhat from what it just told me on exiting
(the total free is the same, though). In that second start, with the
decreased max size, it crashes. (I should note that on some emulations,
the "max" number is not changed at all. When emulating a Clie or a IIIc,
all is fine.) And even though the number is lower on a Palm III, it also
doesn't crash it, I believe since it is a non-EZ device. Unfortunately,
the Palm IIIxs or the Palm Vs are quite unhappy...

Note that this only happens on these devices in the 2MB configuration;
but since it runs fine on a Palm III with only 2MB, I find it hard to
believe it won't run fine on a Palm IIIx with only 2MB (even if it is
running at 4-bit depth instead of 2-bit depth). What I really don't get
is the every-other-time-ness. 

I feel like it isn't memory per se, but some kind of system resource
space not being freed properly, or contiguously, or something...or
something specific to EZ-land that I'm just not aware of. At first I
thought it was because I wasn't resetting the depth on exit, but it
looks like that isn't it. (But I feel it must be something *like* that,
since running one of the built-in apps in between puts everything back
to right...)

Any suggestions would be much appreciated.

zane
-- 
r. zane rutledge  [EMAIL PROTECTED] 
http://www.rzanerutledge.com

-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/

Reply via email to