HashMap< K, V, HASH, ENTRY_HANDLER, ALLOCATOR, MODE, INITIAL_CAPACITY, LOAD_FACTOR, ENTRY_ALLOCATOR >::HashMapAllocator< GENERAL_ALLOCATOR, BLOCK_ALLOCATOR > Class Template Reference

#include <hashmap.h>

Detailed Description

template<typename K, typename V, typename HASH = DefaultCompare, typename ENTRY_HANDLER = HashMapKeyValuePair, typename ALLOCATOR = DefaultAllocator, HASHMAP_MODE MODE = HASHMAP_MODE::DEFAULT, Int INITIAL_CAPACITY = 16, Int LOAD_FACTOR = (MODE == HASHMAP_MODE::SYNCHRONIZED) ? 0 : 10, typename ENTRY_ALLOCATOR = ALLOCATOR>
template<typename GENERAL_ALLOCATOR, typename BLOCK_ALLOCATOR>
class maxon::HashMap< K, V, HASH, ENTRY_HANDLER, ALLOCATOR, MODE, INITIAL_CAPACITY, LOAD_FACTOR, ENTRY_ALLOCATOR >::HashMapAllocator< GENERAL_ALLOCATOR, BLOCK_ALLOCATOR >

Special case of general and entry allocator being different (usually for performance critical fixed/limited size maps).

Public Member Functions

void * AllocBuckets (Int size, MAXON_SOURCE_LOCATION_DECLARATION)
 
void FreeBuckets (void *buckets)
 
EntryAllocEntry (Int size=SIZEOF(Entry))
 
void FreeEntry (const Entry *entry)
 

Private Attributes

GENERAL_ALLOCATOR _bucketAllocator
 
BLOCK_ALLOCATOR _entryAllocator
 

Member Function Documentation

◆ AllocBuckets()

void* AllocBuckets ( Int  size,
MAXON_SOURCE_LOCATION_DECLARATION   
)

◆ FreeBuckets()

void FreeBuckets ( void *  buckets)

◆ AllocEntry()

Entry* AllocEntry ( Int  size = SIZEOF(Entry))

◆ FreeEntry()

void FreeEntry ( const Entry entry)

Member Data Documentation

◆ _bucketAllocator

GENERAL_ALLOCATOR _bucketAllocator
private

◆ _entryAllocator

BLOCK_ALLOCATOR _entryAllocator
private