adding a memory status debug method