blob: 47e3fdfc4b65e88a1112fbfc446e91ce102601c4 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
#pragma once
#include <Common/Allocator.h>
/**
* We are going to use the entire memory we allocated when resizing a hash
* table, so it makes sense to pre-fault the pages so that page faults don't
* interrupt the resize loop. Set the allocator parameter accordingly.
*/
using HashTableAllocator = Allocator<true /* clear_memory */, true /* mmap_populate */>;
template <size_t initial_bytes = 64>
using HashTableAllocatorWithStackMemory = AllocatorWithStackMemory<HashTableAllocator, initial_bytes>;
|