som eheap profiling problems

sadly my game breaks the heap limit for series40 devices. now i want to examine and optimize the critical parts, but thats not as easy as i thought it would be:

my nokia 7210 emulator seems to display the heap usage very exactly. it fits my expectations of what i have calculated by myself. so my game has a heap usage of ~230k
my problem with this emulator is, that it quits with an nonsense error if the 200k limit gets broken. so i am not able to track optimizations (or see that my code changes dont do anything useful).

so i tried the wtk memory profiler from T610. the emulator runs even if i overuse the memory. but the results are somewhat strange: regarding to this emulator my game uses about 40k of heap. this cant be.

so how can it be ? even if there are some architectural and device dependend differences in handling objects or images the result cant be that different.

btw: i cant find any resources about the vram of mobile phones. im interested in their size, because in my game i think every image is completely stored into heap…

The T610 has 80KB of optimized video RAM apart from the heap so that might explain the differences.

You could run the emulator with the -heapsize parameters, and give it more memory so that it doesn’t crash. Every time you go over 200KB it should raise a red flag for you.

shmoove

the hint to the -heapsize parameter was very useful. but now
another question raised:

i changed the heap to 500k, so the game doesn’t crash anymore. but even in very static game phases (e.g. main menu, where definitly now additional objects are created or destroyed) the heap flickers from my expected 230k up to 450k. i have no clue what could happen there.

btw: i read the white paper of the 7210 but got no information about the vram size. do you know it ?

[quote]the heap flickers from my expected 230k up to 450k. i have no clue what could happen there.
[/quote]
I didn’t think about that. Since the heap is bigger, garbage collection doesn’t kick in until much later. That kind of messes up the profiling. I don’t know what you could do about it. Maybe start of with 250KB and slowly move it down to 200KB.

It doesn’t have any vram AFAIK.

shmoove