I have observed Symbian Heap allocator failing when application trying to allocate big chunk of memory ( 4K, 8K, 10 etc). I cross-checked total system memory avilability and found memory more than 3.7 MB RAM is free in the device (when malloc failure happens).
I have following instuction in mmp file for customize Heap size
EPOCHEAPSIZE 1048576 2097152
I am unable to find an API to check memory usage for the applicaton ( or current process). Does Symbian supports any such API?
Googleing this issue further, I found Symbian Heap allocator may be using an inefficient heap allocator algorithm ( ftp://bells.cs.ucl.ac.uk/functional/...roject.pdf.gz).
This article has an interesting finding, Symbian heap allocator has 65% internal fragmentation. But this is an old story, must be resolved in Symbian 3rd edition. ( I am using a 3rd edition device (N91) for my testing).
Do anybody face(ing) such issues with Symbian 3rd Edition phones? What is the appropriate method to avoid such memory failures. Please avoid suggestions like static memory. For example SIP stacks like osip, will do extensive dynamic allocation. This is an appropriate design and Symbian does not de-motivate the usage of Heap.