PDA

View Full Version : Heap Memory Issue


Massman82
01-25-2003, 05:52 PM
Is there any way to "add" heap memory to older devices. The program a developer is making requires a lot of heap memory.

This could restrict the program to only run on OS 5 and Hi-res devices, and the developer does not want that at all! (There will be an OS5 and hi-res version)

Would there be any way to "force" it to run on other devices with less heap memory?

Again, all of your support is greatly appreciated!

foghead
01-25-2003, 09:06 PM
There is no way to add heap memory to older devices since it is tied to the OS version and total memory.

Without trying to sound to glib, maybe the programmer needs to look at his programming style and figure out a way to use less memory on older versions of the OS. If this can't reasonably be done, then the older versions don't matter anyway.

For most of my stuff, Palm OS 3.5 is the cut off point since I tend to use graphics and I am just not interested in jumping through the hoops for older OS versions.

Another thing to keep in mind when targeting OS versions is whether or not users will even buy your app. Keep in mind that countless studies have shown on the desktop side of things that people that do not spend money to upgrade to newer hardware also do not spend money for new software. Aim your product at the people that might actually buy it.

For this reason, I will probably stop paying attention to OS 3.5 pretty soon since the only devices that I am aware of that still use it are phone PDAs like the Treo and devices that are no longer in production. I know two or three people that have had to get rid of Palm Vx's recently because of failing batteries and digitizers.

Eric S
01-25-2003, 11:52 PM
have to agree with that. If you're using up the ~300K heap on most modern PDAs, you need to rethink the way you're approaching the program. This isn't saying that you're doing something wrong, just not the right way for the PalmOS Zen of things.

Massman82
01-26-2003, 12:03 AM
You guys are right. But they figured it out: You can use "store" memory as heap memory. It's slower but it works.

I don't think there is any way for their program to use less heap memory.

My next question

What's the API that Astraware/Kickoo use to play sounds on the NX/NR handhelds? What format does the sound have to be in? Their having trouble playing the sounds on the NX! (Didn't test it yet on the NR)

Anyways, you guys are a huge help. Thanks a lot!

zhamilton1
01-28-2003, 12:10 PM
I would use feature memory...

I am doing a lot of research on it (there is not much about it on the web).

It will allow you to write up to 64KB (that is if you want your application to be compatible before OS 3.5) (:

It has the same access speed as dynamic memory but the same write speed as database records (because it uses DmWrite)

I am looking on how to build a feature manager that could pend writing to the storage since it appears that the writing is not the speed problem but rather the init and exit time of the DmWrite function.

At the moment use FtrPtrNew to allocate memory.
Use FtrGet to get a pointer for READ ONLY!!!
Use DmWrite to write to the pointer
Use FtrPtrFree to release the memory.

I should point out that the memory is in storage. Its life time is untill reset and NOT when the program closes.
Other programs are not affected and you can use as much space which is available...

Hope this helps you...
Enjoy! (: