added get_used_memory