Program memory problem

HARRY

Active Member
Licensed User
Longtime User
Hi,
I have written a small program to notify the user of incoming SMS messages.
Using ShowTodaysscreen the program runs in the background, untill a new message is received.

The program intercepts the incoming message and plays a short wave file repeatedly with increasing intervals. Moreover it shows the number of unread messages. This last function is not critical and could be removed.

Clicking a button, playing the sound stops and the program goes again to the background.

The size of the compiled program is 148 KB. My device has a screen of 480 * 800.
When the program is started the free program memory is reduced by +/- 4MB bytes! In a task manager, the program is reported tu use 330KB.(??)

The program runs fine. However, when I start another large program, e.g. a navigator, then the message program is killed.

A few questions:

1) Is it possible to reduce the memory occupation of this program?

2) Is it possible to indicate that this program is not a candidate for killing?

3) Any other suggestion to solve my problem?

Harry
 

HARRY

Active Member
Licensed User
Longtime User
Hi Erel,

The device is an HTC Touch Diamond 2, but I use a cooked ROM. Although I don't think that the 'chief' has changed memory management, you never know. I have tested it over and over and I am pretty sure that that small program is killed.

I do not load a large image.

The meory occupation of that small program is less than I thought; some 1.5MB. Also I wonder how exact the data on free memory are.

That ROM has very nice features but - if you use some of those - is extremely memory hungry. I can easily save 20 MB of programm memory by not using some of those.

Therefore, I am writing myself some functions. Those will work slower but save a lot of memory.

For me the case is closed.

Thanks for your effort.

Harry
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…