test: use memseg walk instead of iteration