Apended the memory usage testing code at the bottom

Mem usage testing code