Add memory usage statistics. Make a REST API to query statistics.