Implement functions to collect memory access operations.