16 void *synth_base =
reinterpret_cast<void *
>(0x08000000);
17 const size_t synth_size = 1024 * 1024;
18 Arena b(synth_base, synth_size, 16);
20 std::vector<void *> addr;
21 for (
int x = 0; x <
ASIZE; ++x) {
22 addr.push_back(
nullptr);
24 uint32_t s = 0x12345678;
26 for (
int x = 0; x <
BITER; ++x) {
27 int idx = s & (addr.size() - 1);
31 }
else if (!addr[idx]) {
41 for (
void *ptr : addr) {
BENCHMARK(BenchLockedPool, 1300)
void * alloc(size_t size)
Allocate size bytes from this arena.
static void BenchLockedPool(benchmark::State &state)
void free(void *ptr)
Free a previously allocated chunk of memory.
An arena manages a contiguous region of memory by dividing it into chunks.