implement the getMemoryUsage API call (#1022)

4 files changed