Lines Matching refs:memory
900 void InitMemory(uint8_t* memory, size_t bytes) { in InitMemory() argument
902 memory[i] = i; in InitMemory()
903 if (memory[i] == '\0') { in InitMemory()
906 memory[i] = 23; in InitMemory()
919 uint8_t* memory; in ThreadReadTest() local
920 if (posix_memalign(reinterpret_cast<void**>(&memory), pagesize, 2 * pagesize) != 0) { in ThreadReadTest()
924 if (mprotect(&memory[pagesize], pagesize, PROT_NONE) != 0) { in ThreadReadTest()
929 InitMemory(memory, pagesize); in ThreadReadTest()
931 thread_data->data = memory; in ThreadReadTest()
942 if (mprotect(&memory[pagesize], pagesize, PROT_READ | PROT_WRITE) != 0) { in ThreadReadTest()
945 free(memory); in ThreadReadTest()
1016 uint8_t* memory; in ForkedReadTest() local
1017 if (posix_memalign(reinterpret_cast<void**>(&memory), pagesize, 2 * pagesize) != 0) { in ForkedReadTest()
1023 if (mprotect(&memory[pagesize], pagesize, PROT_NONE) != 0) { in ForkedReadTest()
1029 InitMemory(memory, pagesize); in ForkedReadTest()
1031 g_addr = reinterpret_cast<uintptr_t>(memory); in ForkedReadTest()