Thanks for replying and clearly stating that Redlib is not threadsafe.
Regarding switching to newlib, I agree this will aid in solving reentrancy issues but might pull in a different set of issues as pointed out in this thread. Thus I did not switch to newlib but use other measures to handle multithreading and dynamic memory issues as set out below.
Regarding snprintf(), I followed your advice and replaced it by a minimal alternative implementation. printf(), strtok(), etc. will not be used at all.
Regarding the use of heap, I don't mind the carefully considered use of malloc() as long as free() is not called :-). To safeguard against the (hidden) use of dynamic memory allocation, I provided my own implementation of char * _sbrk(int incr) { __asm("BKPT #0\n"); return 0; } to catch calls to malloc().
In other words, I'd like to be in the driving seat when it comes to usage of heap. Therefore I'd appreciate if you could briefly set forth how to decipher the .map file with regard to heap usage. I'm at a loss how to do this and doubt that one can extract the required information from a static view of the memory layout that a map files provides.
Thanks a lot!
Daniel