Hello, I have a problem of internal data memory: I am too short in it. In order to find the places which mostly affects the memory usage, I would like to find the critical path of the memory allocation usage in the overlay process. for example, the following code:
f1() { ... f2() ... } f2() { ... f3() ... } f3() { ... } f4() { ... }
f1--------(4) (Bytes) ----------f2----------------(8) ----------------------------f3--------(4) f4------------------------------(12)
f1 +>>f2 f2 +>>f3 f3 f4
The map file tells you what you want to know. It shows the call tree, and it also has the assignments to data memory for each routine. Find the routines that use data addresses at high addresses, and that is part of one of the long paths. You can then look at the call tree to see how you got there. There's a lot of room for improvement here. It would be nice if there were a tool that could parse the map file and create a more visual representation of the call tree so that you could easily locate the critical path and analyze where to put effort into optimizing the memory usage. But as far as I know, for now, you must do the analysis by hand.
Doing the calculation manually is what I have done. It took me about 2 hours work to put the required info into an excel sheet, but since at that time I had a memory space overflow not all the functions got into the call tree in the map file - so now I have to repeat the 2 hours work again. using the excel sheet I could find the critical path, and indeed, for each byte that was optimized, you could see the change in the map file directly. 1) I am looking for an automatic tool or linker swtich that will produce information that will be orginized in a way that will show the call tree and the critical pathes in a clear way. (clearer then the call tree that is in the map file). Is there any such an option ? 2) Besides, the internal memory usage as the linker reports was diffrent then the one that is in the call tree that I have built. There can be several reasons for that, and currently I think that it is beacuse the call tree from the map file, that I used when I created the full call tree in my excel sheet was incomplete due to memory overflow. my question regarding this non-compilance: are there any memory bytes that are not reported in the call tree in the map file ? Thanks. Amit
"another product" that I once used had a file that looked something like this:
main-------------main-funca-funcb-|funcc main-funcd-------/ main-funce main-funcf|funcg-funch main-funci|