Code optimization.
Collect statistic about memory usage.