Home | History | Annotate | Download | only in libbacktrace

Lines Matching defs:memory

39 #include <memory>
982 static void InitMemory(uint8_t* memory, size_t bytes) {
984 memory[i] = i;
985 if (memory[i] == '\0') {
988 memory[i] = 23;
1001 uint8_t* memory;
1002 if (posix_memalign(reinterpret_cast<void**>(&memory), pagesize, 2 * pagesize) != 0) {
1006 if (mprotect(&memory[pagesize], pagesize, PROT_NONE) != 0) {
1010 // Set up a simple pattern in memory.
1011 InitMemory(memory, pagesize);
1013 thread_data->data = memory;
1015 // Tell the caller it's okay to start reading memory.
1018 // Loop waiting for the caller to finish reading the memory.
1023 // and access data on this page when freeing the memory.
1024 if (mprotect(&memory[pagesize], pagesize, PROT_READ | PROT_WRITE) != 0) {
1027 free(memory);
1100 uint8_t* memory;
1101 if (posix_memalign(reinterpret_cast<void**>(&memory), pagesize, 2 * pagesize) != 0) {
1102 perror("Failed to allocate memory\n");
1107 if (mprotect(&memory[pagesize], pagesize, PROT_NONE) != 0) {
1108 perror("Failed to mprotect memory\n");
1112 // Set up a simple pattern in memory.
1113 InitMemory(memory, pagesize);
1115 g_addr = reinterpret_cast<uint64_t>(memory);
1171 // find them, that's a bug in the memory read handling code in libunwind.
1279 fprintf(stderr, "Failed to map in memory: %s\n", strerror(errno));