add used_memory function
Merge pull request #1 from nbargnesi/master

add used_memory function