Download user manual

Transcript
316
Embedded Systems
Tracking Memory Usage
In order to track memory usage and determine what’ll be required on your target
system, you can use the CONFIG_DEBUG_MALLOC option to dump diagnostics
about memory usage to the console. This will allow you to see approximately how
much memory a certain operation will require, and let you play with rearranging
operations to reduce memory consumption. For example having two objects active
simultaneously rather than using them one after the other will result in a total memory
consumption equal to the sum of their sizes rather than only the size of the larger of
the two objects.
The memory usage diagnostics will reveal the FIFO nature of the memory allocation
that cryptlib uses to try to minimise its overall footprint. You can use the sequence
numbers after each allocate and free to track the order in which things are used.