Improve memory.go
Fix a spelling mistake and add a memUsed function.