src: Implement module to check memory usage during runtime