| 79 | } |
| 80 | |
| 81 | void* add_ptr(void* base, uintptr_t delta) { |
| 82 | return reinterpret_cast<void*>(reinterpret_cast<uintptr_t>(base) + delta); |
| 83 | } |
| 84 | |
| 85 | // To test MallocContiguousBuffers and FreeContiguous, we just check for |
| 86 | // expected nullptrs, and write to each byte of allocated memory. We rely on |