Set up some debug memory functions