Rewrite codes used to collect memory access information