Container

Utility functions and constants

Members

Static functions

hash
size_t hash(K k, size_t length)

generic hash function, using the default hashing. Thanks to 'mwarning' for the optimization suggestion

reap
void reap(V v)

generic value reaper, which does nothing

reap
void reap(K k, V v)

generic key/value reaper, which does nothing

Static variables

defaultInitialBuckets
size_t defaultInitialBuckets;

default initial number of buckets of a non-empty hashmap

defaultLoadFactor
float defaultLoadFactor;

default load factor for a non-empty hashmap. The hash table is resized when the proportion of elements per buckets exceeds this limit

Structs

Chunk
struct Chunk(T)

Chunk allocator (non GC)

ChunkGC
struct ChunkGC(T)

GC Chunk allocator

Collect
struct Collect(T)

generic GC allocation manager

GCChunk
struct GCChunk(T, uint chunkSize)

GCChunk allocator

Malloc
struct Malloc(T)

Malloc allocation manager.

Templates

DefaultCollect
template DefaultCollect(T)

aliases to the correct Default allocator depending on how big the type is. It makes less sense to use a GCChunk allocator if the type is going to be larger than a page (currently there is no way to get the page size from the GC, so we assume 4096 bytes). If not more than one unit can fit into a page, then we use the default GC allocator.

DefaultCollect
template DefaultCollect(T)
Undocumented in source.

Meta