ClickHouse/dbms/Common/HashTable/HashTableAllocator.h

15 lines
487 B
C++
Raw Normal View History

2014-03-17 02:01:03 +00:00
#pragma once
#include <Common/Allocator.h>
2014-03-17 02:01:03 +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 */>;
2014-03-17 02:01:03 +00:00
template <size_t N = 64>
using HashTableAllocatorWithStackMemory = AllocatorWithStackMemory<HashTableAllocator, N>;