2014-03-17 02:01:03 +00:00
|
|
|
#pragma once
|
|
|
|
|
2017-04-01 09:19:00 +00:00
|
|
|
#include <Common/Allocator.h>
|
2014-03-17 02:01:03 +00:00
|
|
|
|
|
|
|
|
2019-08-30 16:25:46 +00:00
|
|
|
/**
|
|
|
|
* 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 */>;
|
2015-01-24 01:55:29 +00:00
|
|
|
|
2014-03-17 02:01:03 +00:00
|
|
|
template <size_t N = 64>
|
2015-11-15 03:09:40 +00:00
|
|
|
using HashTableAllocatorWithStackMemory = AllocatorWithStackMemory<HashTableAllocator, N>;
|