Add a meminfo function for diagnostic purposes