Log used memory stats

Fix #237