parin.joka.memory

The memory module provides functions for dealing with memory and various general-purpose containers. List, BufferList, and FixedList are the "basic" containers. Most other containers can accept one of those to adjust their allocation strategy.

Types 21

Groups allocations under a name for tracking purposes.

Fields
IStr _currentAllocationGroup
Constructors
this(IStr group)
Destructors

A dynamic allocator API.

Fields
void * allocatorState
Methods
void * malloc(Sz alignment, Sz size, IStr file, Sz line) @system nothrowAllocates a block of memory.
void * realloc(Sz alignment, void * oldPtr, Sz oldSize, Sz newSize, IStr file, Sz line) @system nothrowReallocates a block of memory.
void free(Sz alignment, void * oldPtr, Sz oldSize, IStr file, Sz line) @system nothrowFrees a block of memory.
aliasAllocatorMallocFunc = void * function(void * allocatorState, Sz alignment, Sz size, IStr file, Sz line)
aliasAllocatorReallocFunc = void * function(void * allocatorState, Sz alignment, void * oldPtr, Sz oldSize, Sz newSize, IStr file, Sz line)
aliasAllocatorFreeFunc = void function(void * allocatorState, Sz alignment, void * oldPtr, Sz oldSize, IStr file, Sz line)

Replaces the global memory context for the current scope with the given allocator.

Fields
MemoryContext _previousMemoryContext
Constructors
this(MemoryContext newContext)
this(ref Arena arena)
this(ref GrowingArena arena)
Destructors
aliasLStr = List!char

A dynamic string of chars.

aliasBStr = BufferList!char

A dynamic string of chars backed by external memory.

aliasFStr(Sz N) = FixedList!(char, N)

A dynamic string of chars allocated on the stack.

structList(T)

A dynamic array.

Fields
isBasicContainer
isBufferContainer
hasFixedCapacity
T[] items
Sz capacity
bool canIgnoreLeak
Methods
Sz length() @trusted @nogc @safe nothrow
T * ptr() @trusted @nogc @safe nothrow
bool isEmpty() @trusted @nogc @safe nothrow
bool appendBlank(IStr file = __FILE__, Sz line = __LINE__) @trusted @safe nothrow
bool append(const(T)[] args...) @trusted @safe nothrow
bool appendSource(IStr file = __FILE__, Sz line = __LINE__, const(T)[] args = []...) @trusted @safe nothrow
bool push(const(T) arg, IStr file = __FILE__, Sz line = __LINE__) @trusted @safe nothrow
void remove(Sz i) @trusted @nogc @safe nothrow
void removeShift(Sz i) @nogc @safe nothrow
void pop() @trusted @nogc @safe nothrow
void popFront() @nogc @safe nothrow
bool reserve(Sz newCapacity, IStr file = __FILE__, Sz line = __LINE__) @trusted @safe nothrow
bool resizeBlank(Sz newLength, IStr file = __FILE__, Sz line = __LINE__) @trusted @safe nothrow
bool resize(Sz newLength, IStr file = __FILE__, Sz line = __LINE__) @safe nothrow
void fill(const(T) value) @trusted @nogc @safe nothrow
void clear() @nogc @safe nothrow
void free(IStr file = __FILE__, Sz line = __LINE__) @trusted @safe nothrow
void ignoreLeak() @nogc @safe nothrow
IStr toStr() @nogc @safe nothrow
T[] opSlice(Sz dim)(Sz i, Sz j) @trusted nothrow @nogc @safe
T[] opIndex() @trusted nothrow @nogc @safe
T[] opIndex(T[] slice) @trusted nothrow @nogc @safe
T opIndex(Sz i) @trusted nothrow @nogc @safe ref
void opIndexAssign(const(T) rhs) @trusted nothrow @nogc @safe
void opIndexAssign(const(T) rhs, Sz i) @trusted nothrow @nogc @safe
void opIndexOpAssign(const(char)[] op)(const(T) rhs, Sz i) @trusted nothrow @nogc @safe
Sz opDollar(Sz dim)() @trusted nothrow @nogc @safe
Constructors
this(MemoryContext capture, const(T)[] args...)
this(ref Arena arena, const(T)[] args...)
this(ref GrowingArena arena, const(T)[] args...)
this(const(T)[] args...)
structBufferList(T)

A dynamic array that uses external memory provided at runtime.

Fields
isBasicContainer
isBufferContainer
hasFixedCapacity
T[] data
Sz length
Methods
bool growCapacity(C)(ref C arena)
bool resizeCapacity(C)(ref C arena, Sz newCapacity) @trusted
bool resizeCapacity(T[] newRawPureData) @trusted nothrow @nogc
T[] items() @trusted @safe nothrow @nogc
T * ptr() @trusted @safe nothrow @nogc
bool isEmpty() @trusted @safe nothrow @nogc
Sz capacity() @trusted @safe nothrow @nogc
bool appendBlank(IStr file = __FILE__, Sz line = __LINE__) @trusted @safe nothrow @nogc
bool append(const(T)[] args...) @trusted @safe nothrow @nogc
bool appendSource(IStr file = __FILE__, Sz line = __LINE__, const(T)[] args = []...) @trusted @safe nothrow @nogc
bool push(const(T) arg, IStr file = __FILE__, Sz line = __LINE__) @trusted @safe nothrow @nogc
void remove(Sz i) @trusted @safe nothrow @nogc
void removeShift(Sz i) @safe nothrow @nogc
void pop() @safe nothrow @nogc
void popFront() @safe nothrow @nogc
void reserve(Sz newCapacity, IStr file = __FILE__, Sz line = __LINE__) @safe nothrow @nogc
void resizeBlank(Sz newLength, IStr file = __FILE__, Sz line = __LINE__) @safe nothrow @nogc
void resize(Sz newLength, IStr file = __FILE__, Sz line = __LINE__) @safe nothrow @nogc
void fill(const(T) value) @trusted @safe nothrow @nogc
void clear() @safe nothrow @nogc
IStr toStr() @safe nothrow @nogc
void free(IStr file = __FILE__, Sz line = __LINE__) @safe nothrow @nogc
void ignoreLeak() @safe nothrow @nogc
MemoryContext capture() @safe nothrow @nogc
void capture(MemoryContext value) @safe nothrow @nogc
T[] opSlice(Sz dim)(Sz i, Sz j) @trusted nothrow @nogc @safe
T[] opIndex() @trusted nothrow @nogc @safe
T[] opIndex(T[] slice) @trusted nothrow @nogc @safe
T opIndex(Sz i) @trusted nothrow @nogc @safe ref
void opIndexAssign(const(T) rhs) @trusted nothrow @nogc @safe
void opIndexAssign(const(T) rhs, Sz i) @trusted nothrow @nogc @safe
void opIndexOpAssign(const(char)[] op)(const(T) rhs, Sz i) @trusted nothrow @nogc @safe
Sz opDollar(Sz dim)() @trusted nothrow @nogc @safe
Constructors
this(T[] data, const(T)[] args...)
structFixedList(T, Sz N)

A dynamic array allocated on the stack.

Fields
isBasicContainer
isBufferContainer
hasFixedCapacity
StaticArray!(T, N) data
Sz length
capacity
Methods
T[] items() @trusted @safe nothrow @nogc
T * ptr() @trusted @safe nothrow @nogc
bool isEmpty() @trusted @safe nothrow @nogc
bool appendBlank(IStr file = __FILE__, Sz line = __LINE__) @trusted @safe nothrow @nogc
bool append(const(T)[] args...) @trusted @safe nothrow @nogc
bool appendSource(IStr file = __FILE__, Sz line = __LINE__, const(T)[] args = []...) @trusted @safe nothrow @nogc
bool push(const(T) arg, IStr file = __FILE__, Sz line = __LINE__) @trusted @safe nothrow @nogc
void remove(Sz i) @trusted @safe nothrow @nogc
void removeShift(Sz i) @safe nothrow @nogc
void pop() @safe nothrow @nogc
void popFront() @safe nothrow @nogc
void reserve(Sz newCapacity, IStr file = __FILE__, Sz line = __LINE__) @safe nothrow @nogc
void resizeBlank(Sz newLength, IStr file = __FILE__, Sz line = __LINE__) @safe nothrow @nogc
void resize(Sz newLength, IStr file = __FILE__, Sz line = __LINE__) @safe nothrow @nogc
void fill(const(T) value) @trusted @safe nothrow @nogc
void clear() @safe nothrow @nogc
IStr toStr() @safe nothrow @nogc
void free(IStr file = __FILE__, Sz line = __LINE__) @safe nothrow @nogc
void ignoreLeak() @safe nothrow @nogc
MemoryContext capture() @safe nothrow @nogc
void capture(MemoryContext value) @safe nothrow @nogc
T[] opSlice(Sz dim)(Sz i, Sz j) @trusted nothrow @nogc @safe
T[] opIndex() @trusted nothrow @nogc @safe
T[] opIndex(T[] slice) @trusted nothrow @nogc @safe
T opIndex(Sz i) @trusted nothrow @nogc @safe ref
void opIndexAssign(const(T) rhs) @trusted nothrow @nogc @safe
void opIndexAssign(const(T) rhs, Sz i) @trusted nothrow @nogc @safe
void opIndexOpAssign(const(char)[] op)(const(T) rhs, Sz i) @trusted nothrow @nogc @safe
Sz opDollar(Sz dim)() @trusted nothrow @nogc @safe
Constructors
this(const(T)[] args...)

An item of a sparse array.

Fields
Item value
bool flag
structSparseList(T, D = List!(SparseListItem!T)) if (isSparseContainerPartsValid!(T, D))

A dynamic sparse array.

Fields
isBasicContainer
isBufferContainer
hasFixedCapacity
D data
Sz hotIndex
Sz openIndex
Sz length
Methods
Sz capacity() @nogc @safe nothrow
bool isEmpty() @nogc @safe nothrow
bool has(Sz i) @nogc @safe nothrow
T hotItem() @nogc ref @safe nothrow
bool append(const(T)[] args...) @trusted @safe nothrow
bool appendSource(IStr file = __FILE__, Sz line = __LINE__, const(T)[] args = []...) @trusted @safe nothrow
bool push(const(T) arg, IStr file = __FILE__, Sz line = __LINE__) @trusted @safe nothrow
void remove(Sz i) @nogc @safe nothrow
void reserve(Sz capacity, IStr file = __FILE__, Sz line = __LINE__) @safe nothrow
void clear() @nogc @safe nothrow
void free(IStr file = __FILE__, Sz line = __LINE__) @safe nothrow
void ignoreLeak() @nogc @safe nothrow
@nogc auto ids() @safe nothrow
@nogc auto items() @safe nothrow
T opIndex(Sz i) @trusted @nogc @safe nothrow ref
void opIndexAssign(const(T) rhs, Sz i) @trusted @nogc @safe nothrow
void opIndexOpAssign(IStr op)(const(T) rhs, Sz i) @trusted @nogc @safe nothrow
Constructors
this(MemoryContext capture, const(T)[] args...)
this(ref Arena arena, const(T)[] args...)
this(ref GrowingArena arena, const(T)[] args...)
this(const(T)[] args...)
structGenList(T, D = SparseList!T, G = List!Gen) if (isGenContainerPartsValid!(T, D, G))

A dynamic generational array.

Fields
isBasicContainer
isBufferContainer
hasFixedCapacity
D data
G generations
Methods
Sz length() @nogc @safe nothrow
Sz capacity() @nogc @safe nothrow
bool isEmpty() @nogc @safe nothrow
bool has(GenIndex i) @nogc @safe nothrow
GenIndex append(const(T) arg, IStr file = __FILE__, Sz line = __LINE__) @safe nothrow
void remove(GenIndex i) @nogc @safe nothrow
void reserve(Sz capacity, IStr file = __FILE__, Sz line = __LINE__) @safe nothrow
void clear() @nogc @safe nothrow
void clearAndResetGenerations() @nogc @safe nothrow
void free(IStr file = __FILE__, Sz line = __LINE__) @safe nothrow
void ignoreLeak() @nogc @safe nothrow
@nogc auto ids() @safe nothrow
@nogc auto items() @safe nothrow
T opIndex(GenIndex i) @trusted @nogc @safe nothrow ref
void opIndexAssign(const(T) rhs, GenIndex i) @trusted @nogc @safe nothrow
void opIndexOpAssign(IStr op)(const(T) rhs, GenIndex i) @trusted @nogc @safe nothrow
Constructors
this(ref Arena arena)
this(ref GrowingArena arena)
structGBitList(T, D = List!T) if (__traits(isUnsigned, T))

A dynamic bit array.

Fields
isBasicContainer
isBufferContainer
hasFixedCapacity
D buckets
Sz length
zero
one
bucketCapacity
bucketIndexMask
bucketShiftAmount
Methods
Sz capacity() @nogc @safe nothrow
bool isEmpty() @nogc @safe nothrow
bool append(const(bool)[] args...) @safe nothrow
bool appendSource(IStr file = __FILE__, Sz line = __LINE__, const(bool)[] args = []...) @safe nothrow
bool push(const(bool) arg, IStr file = __FILE__, Sz line = __LINE__) @safe nothrow
void remove(Sz i) @nogc @safe nothrow
void removeShift(Sz i) @nogc @safe nothrow
void pop() @nogc @safe nothrow
void popFront() @nogc @safe nothrow
bool reserve(Sz newCapacity, IStr file = __FILE__, Sz line = __LINE__) @safe nothrow
void fill(const(bool) value) @nogc @safe nothrow
void clear() @trusted @nogc @safe nothrow
void free(IStr file = __FILE__, Sz line = __LINE__) @safe nothrow
void ignoreLeak() @nogc @safe nothrow
bool opIndex(Sz i) @trusted @nogc @safe nothrow
void opIndexAssign(const(bool) rhs, Sz i) @trusted @nogc @safe nothrow
Constructors
this(ref Arena arena)
this(ref GrowingArena arena)

The common bit array type.

structGrid(T, D = List!T) if (isBasicContainerType!D)

A dynamic 2D array.

Fields
isBasicContainer
isBufferContainer
hasFixedCapacity
D tiles
Sz rowCount
Sz colCount
Methods
Sz length() @trusted nothrow @nogc @safe
T * ptr() @trusted nothrow @nogc @safe
Sz capacity() @trusted nothrow @nogc @safe
bool has(Sz row, Sz col) @trusted nothrow @nogc @safe
bool isEmpty() @trusted nothrow @nogc @safe
T[] opIndex() @trusted nothrow @nogc @safe
T opIndex(Sz row, Sz col) @trusted nothrow @nogc @safe ref
void opIndexAssign(T rhs) @trusted nothrow @nogc @safe
void opIndexAssign(const(T) rhs, Sz row, Sz col) @trusted nothrow @nogc @safe
void opIndexOpAssign(IStr op)(const(T) rhs, Sz row, Sz col) @trusted nothrow @nogc @safe
Sz opDollar(Sz dim)() @trusted nothrow @nogc @safe
void reserve(Sz newCapacity, IStr file = __FILE__, Sz line = __LINE__) @safe nothrow
void resizeBlank(Sz newRowCount, Sz newColCount, IStr file = __FILE__, Sz line = __LINE__) @safe nothrow
void resize(Sz newRowCount, Sz newColCount, IStr file = __FILE__, Sz line = __LINE__) @safe nothrow
void fill(T value) @nogc @safe nothrow
void clear() @nogc @safe nothrow
void free(IStr file = __FILE__, Sz line = __LINE__) @safe nothrow
void ignoreLeak() @nogc @safe nothrow
Constructors
this(ref Arena arena)
this(ref GrowingArena arena)
this(Sz rowCount, Sz colCount, T value = T.init, IStr file = __FILE__, Sz line = __LINE__)
this(MemoryContext capture, Sz rowCount, Sz colCount, T value = T.init, IStr file = __FILE__, Sz line = __LINE__)
structArena

A static arena allocator.

Fields
ubyte * data
Sz capacity
Sz offset
Sz checkpointOffset
Sz previousOffset
void * lastPtr
Arena * next
Methods
void ready(ubyte * newData, Sz newCapacity) @trusted nothrow @nogc
void ready(ubyte[] newData) @trusted nothrow @nogc
void * malloc(Sz alignment, Sz size, IStr file = __FILE__, Sz line = __LINE__) @trusted nothrow @nogc
void * realloc(Sz alignment, void * oldPtr, Sz oldSize, Sz newSize, IStr file = __FILE__, Sz line = __LINE__) @trusted nothrow @nogc
T * makeBlank(T)(IStr file = __FILE__, Sz line = __LINE__) @trusted nothrow @nogc
T * make(T)(IStr file = __FILE__, Sz line = __LINE__) @trusted nothrow @nogc
T * make(T)(const(T) value, IStr file = __FILE__, Sz line = __LINE__) @trusted nothrow @nogc
T[] makeSliceBlank(T)(Sz length, IStr file = __FILE__, Sz line = __LINE__) @trusted nothrow @nogc
T[] makeSlice(T)(Sz length, IStr file = __FILE__, Sz line = __LINE__) @trusted nothrow @nogc
T[] makeSlice(T)(Sz length, const(T) value, IStr file = __FILE__, Sz line = __LINE__) @trusted nothrow @nogc
T[] makeSlice(T)(const(T)[] values, IStr file = __FILE__, Sz line = __LINE__) @trusted nothrow @nogc
T[] resizeSlice(T)(T * values, Sz oldLength, Sz newLength, IStr file = __FILE__, Sz line = __LINE__) @trusted nothrow @nogc
void checkpoint() @trusted nothrow @nogc
void rollback() @trusted nothrow @nogc
void rollback(Sz value) @trusted nothrow @nogc
void dropCheckpoint() @trusted nothrow @nogc
void clear() @trusted nothrow @nogc
void reset(IStr file = __FILE__, Sz line = __LINE__) @trusted nothrow @nogc
MemoryContext toMemoryContext() @trusted nothrow @nogc
Constructors
this(ubyte * data, Sz capacity)
this(ubyte[] data)

A dynamic arena allocator.

Fields
Arena * head
Arena * current
Sz chunkCapacity
Methods
void ready(Sz newChunkCapacity, IStr file = __FILE__, Sz line = __LINE__) @trusted nothrow
void * malloc(Sz alignment, Sz size, IStr file = __FILE__, Sz line = __LINE__) @trusted nothrow
void * realloc(Sz alignment, void * oldPtr, Sz oldSize, Sz newSize, IStr file = __FILE__, Sz line = __LINE__) @trusted nothrow
T * makeBlank(T)(IStr file = __FILE__, Sz line = __LINE__) @trusted nothrow
T * make(T)(IStr file = __FILE__, Sz line = __LINE__) @trusted nothrow
T * make(T)(const(T) value, IStr file = __FILE__, Sz line = __LINE__) @trusted nothrow
T[] makeSliceBlank(T)(Sz length, IStr file = __FILE__, Sz line = __LINE__) @trusted nothrow
T[] makeSlice(T)(Sz length, IStr file = __FILE__, Sz line = __LINE__) @trusted nothrow
T[] makeSlice(T)(Sz length, const(T) value, IStr file = __FILE__, Sz line = __LINE__) @trusted nothrow
T[] makeSlice(T)(const(T)[] values, IStr file = __FILE__, Sz line = __LINE__) @trusted nothrow
T[] resizeSlice(T)(T * values, Sz oldLength, Sz newLength, IStr file = __FILE__, Sz line = __LINE__) @trusted nothrow
void free(IStr file = __FILE__, Sz line = __LINE__) @trusted nothrow
void clear() @trusted nothrow @nogc
MemoryContext toMemoryContext() @trusted nothrow @nogc
Constructors
this(Sz chunkCapacity, IStr file = __FILE__, Sz line = __LINE__)
struct_ScopedArena(T)
Fields
T * _currentArena
Sz _currentArenaCheckpointOffset
Methods
void * malloc(Sz alignment, Sz size, IStr file = __FILE__, Sz line = __LINE__) @trusted nothrow
void * realloc(Sz alignment, void * oldPtr, Sz oldSize, Sz newSize, IStr file = __FILE__, Sz line = __LINE__) @trusted nothrow
T * makeBlank(T)(IStr file = __FILE__, Sz line = __LINE__) @trusted nothrow
T * make(T)(IStr file = __FILE__, Sz line = __LINE__) @trusted nothrow
T * make(T)(const(T) value, IStr file = __FILE__, Sz line = __LINE__) @trusted nothrow
T[] makeSliceBlank(T)(Sz length, IStr file = __FILE__, Sz line = __LINE__) @trusted nothrow
T[] makeSlice(T)(Sz length, IStr file = __FILE__, Sz line = __LINE__) @trusted nothrow
T[] makeSlice(T)(Sz length, const(T) value, IStr file = __FILE__, Sz line = __LINE__) @trusted nothrow
T[] resizeSlice(T)(T * values, Sz oldLength, Sz newLength, IStr file = __FILE__, Sz line = __LINE__) @trusted nothrow
Constructors
this(ref T data)
Destructors

Functions 64

fnScopedMemoryContext ScopedDefaultMemoryContext() @safe nothrow @nogcReplaces the global memory context for the current scope with the default allocator.
fnvoid * jokaSystemReallocWrapper(void * allocatorState, Sz alignment, void * oldPtr, Sz oldSize, Sz newSize, IStr file, Sz line) @system nothrowA realloc wrapper that uses the system allocator.
fnvoid * jokaMalloc(Sz size, IStr file = __FILE__, Sz line = __LINE__) @system nothrowAllocates a block of memory.
fnvoid * jokaRealloc(void * ptr, Sz size, Sz oldSize = 0, IStr file = __FILE__, Sz line = __LINE__) @system nothrowReallocates a block of memory.
fnvoid jokaFree(void * ptr, Sz oldSize = 0, IStr file = __FILE__, Sz line = __LINE__) @system nothrowFrees a block of memory.
fnT * jokaMakeBlank(T)(IStr file = __FILE__, Sz line = __LINE__) @system nothrow @trustedAllocates memory for a value without initializing it.
fnT * jokaMakeBlank(T)(MemoryContext context, IStr file = __FILE__, Sz line = __LINE__) @system nothrow @trustedAllocates memory for a value without initializing it.
fnT * jokaMake(T)(IStr file = __FILE__, Sz line = __LINE__) @system nothrow @trustedAllocates memory for a value and initializes it.
fnT * jokaMake(T)(MemoryContext context, IStr file = __FILE__, Sz line = __LINE__) @system nothrow @trustedAllocates memory for a value and initializes it.
fnT * jokaMake(T)(const(T) value, IStr file = __FILE__, Sz line = __LINE__) @system nothrow @trustedAllocates memory for a value and initializes it.
fnT * jokaMake(T)(MemoryContext context, const(T) value, IStr file = __FILE__, Sz line = __LINE__) @system nothrow @trustedAllocates memory for a value and initializes it.
fnT[] jokaMakeSliceBlank(T)(Sz length, IStr file = __FILE__, Sz line = __LINE__) @system nothrow @trustedAllocates a slice without initializing its elements.
fnT[] jokaMakeSliceBlank(T)(MemoryContext context, Sz length, IStr file = __FILE__, Sz line = __LINE__) @system nothrow @trustedAllocates a slice without initializing its elements.
fnT[] jokaMakeSlice(T)(Sz length, IStr file = __FILE__, Sz line = __LINE__) @system nothrow @trustedAllocates a slice and initializes its elements.
fnT[] jokaMakeSlice(T)(MemoryContext context, Sz length, IStr file = __FILE__, Sz line = __LINE__) @system nothrow @trustedAllocates a slice and initializes its elements.
fnT[] jokaMakeSlice(T)(Sz length, const(T) value, IStr file = __FILE__, Sz line = __LINE__) @system nothrow @trustedAllocates a slice and initializes its elements.
fnT[] jokaMakeSlice(T)(MemoryContext context, Sz length, const(T) value, IStr file = __FILE__, Sz line = __LINE__) @system nothrow @trustedAllocates a slice and initializes its elements.
fnT[] jokaMakeSlice(T)(const(T)[] values, IStr file = __FILE__, Sz line = __LINE__) @system nothrow @trustedAllocates a slice and initializes its elements.
fnT[] jokaMakeSlice(T)(MemoryContext context, const(T)[] values, IStr file = __FILE__, Sz line = __LINE__) @system nothrow @trustedAllocates a slice and initializes its elements.
fnT[] jokaResizeSlice(T)(T * values, Sz length, Sz oldLength = 0, IStr file = __FILE__, Sz line = __LINE__) @system nothrow @trustedResizes a slice, with the previous pointer getting freed.
fnT[] jokaResizeSlice(T)(MemoryContext context, T * values, Sz length, Sz oldLength = 0, IStr file = __FILE__, Sz line = __LINE__) @system nothrow @trustedResizes a slice, with the previous pointer getting freed.
fnT jokaMakeJointBlank(T)(Sz * outTotalBytes, Sz[] lengths...) if (is(T == struct)) @system nothrow @trustedAllocates a struct's slice fields in a single contiguous block without initializing them. Free the entire block by freeing the first field's pointer.
fnT jokaMakeJointBlank(T)(MemoryContext context, Sz * outTotalBytes, Sz[] lengths...) if (is(T == struct)) @system nothrow @trustedAllocates a struct's slice fields in a single contiguous block without initializing them. Free the entire block by freeing the first field's pointer.
fnT jokaMakeJoint(T)(Sz[] lengths...) if (is(T == struct)) @system nothrow @trustedAllocates a struct's slice fields in a single contiguous block and initializes them to zero. Free the entire block by freeing the first field's pointer.
fnT jokaMakeJoint(T)(MemoryContext context, Sz[] lengths...) if (is(T == struct)) @system nothrow @trustedAllocates a struct's slice fields in a single contiguous block and initializes them to zero. Free the entire block by freeing the first field's pointer.
fnvoid * nullAllocatorReallocWrapper(void * allocatorState, Sz alignment, void * oldPtr, Sz oldSize, Sz newSize, IStr file, Sz line) @system nothrow @trusted @nogcA realloc wrapper that always returns null.
fnvoid jokaRestoreNullAllocatorSetup(ref MemoryContext context) @system nothrow @trusted @nogcConfigures a memory context to use the null allocator.
fnvoid jokaRestoreDefaultAllocatorSetup(ref MemoryContext context) @system nothrow @trusted @nogcConfigures a memory context to use the default allocator.
fnvoid jokaEnsureCapture(ref MemoryContext capture) @system nothrow @trusted @nogcSets a memory context to the global context if it has no realloc function.
fnauto ignoreLeak(T)(T ptr) @system nothrow @trusted @nogcMarks an allocation as ignored by the memory tracker.
fnSz beginAllocationGroup(IStr group) @system nothrow @trustedBegins a new allocation group for the memory tracker and returns the current group depth.
fnSz endAllocationGroup() @system nothrow @trusted @nogcEnds the current allocation group for the memory tracker and returns the current group depth.
fnIStr memoryTrackingInfo(IStr pathFilter = "", bool canShowEmpty = false) @trusted nothrowReturns a summary of memory leaks and invalid frees detected by the memory tracker.
fn_ScopedArena!T ScopedArena(T)(ref T arena) @trusted @safe nothrowA RAII helper for arenas.
fnvoid * arenaAllocatorReallocWrapper(void * allocatorState, Sz alignment, void * oldPtr, Sz oldSize, Sz newSize, IStr file, Sz line) @trusted @nogc @safe nothrow
fnvoid * growingArenaAllocatorReallocWrapper(void * allocatorState, Sz alignment, void * oldPtr, Sz oldSize, Sz newSize, IStr file, Sz line) @trusted @safe nothrow
fnIStr gridIndexErrorMessage(Sz row, Sz col) @trusted @nogc @safe nothrow
fnIStr genIndexErrorMessage(Sz value, Sz generation) @trusted @nogc @safe nothrow
fnSz findListCapacity(Sz length, Sz currentCapacity = 0) @trusted @nogc @safe nothrow
fnSz findListCapacityFastAndAssumeOneAddedItemInLength(Sz length, Sz currentCapacity = 0) @trusted @nogc @safe nothrow
fnSz findGridIndex(Sz row, Sz col, Sz colCount) @trusted @nogc @safe nothrow
fnSz findGridRow(Sz gridIndex, Sz colCount) @trusted @nogc @safe nothrow
fnSz findGridCol(Sz gridIndex, Sz colCount) @trusted @nogc @safe nothrow
fnIStr fmtIntoListWithStrs(S = LStr)(ref S list, bool canAppend, IStr fmtStr, IStr[] args...) @safe nothrowFormats a string using a list and returns the resulting formatted string. The list is cleared before writing if `canAppend` is false. For details on formatting behavior, see the `fmtIntoBufferWithS...
fnIStr fmtIntoList(S = LStr, A...)(ref S list, bool canAppend, IStr fmtStr, A args) @safe nothrowFormats a string using a list and returns the resulting formatted string. The list is cleared before writing if `canAppend` is false. For details on formatting behavior, see the `fmtIntoBufferWithS...
fnIStr fmtIntoList(S = LStr, A...)(ref S list, bool canAppend, InterpolationHeader header, A args, InterpolationFooter footer) @safe nothrowFormats a string using a list and returns the resulting formatted string. The list is cleared before writing if `canAppend` is false. For details on formatting behavior, see the `fmtIntoBufferWithS...
fnIStr sprintf(S = LStr, A...)(ref S buffer, IStr fmtStr, A args) @safe nothrowPrints formatted text to the given buffer. For details on formatting, see the `fmtIntoBuffer` function.
fnIStr sprintf(S = LStr, A...)(ref S buffer, InterpolationHeader header, A args, InterpolationFooter footer) @safe nothrowPrints formatted text to the given buffer. For details on formatting, see the `fmtIntoBuffer` function.
fnIStr sprintfln(S = LStr, A...)(ref S buffer, IStr fmtStr, A args) @safe nothrowPrints formatted text with a new line at the end to the given buffer. For details on formatting, see the `fmtIntoBuffer` function.
fnIStr sprintfln(S = LStr, A...)(ref S buffer, InterpolationHeader header, A args, InterpolationFooter footer) @safe nothrowPrints formatted text with a new line at the end to the given buffer. For details on formatting, see the `fmtIntoBuffer` function.
fnvoid sprint(S = LStr, A...)(ref S buffer, A args) @safe nothrowPrints text to the given buffer.
fnvoid sprintln(S = LStr, A...)(ref S buffer, A args) @safe nothrowPrints text with a new line at the end to the given buffer.
fnvoid freeOnlyItems(T)(ref T container, IStr file = __FILE__, Sz line = __LINE__) @safe nothrowFrees only the items within the container without freeing the container itself. Calls `free` on each item, passing `file` and `line` if supported.
fnvoid freeWithItems(T)(ref T container, IStr file = __FILE__, Sz line = __LINE__) @safe nothrowFrees all items within the container and then frees the container itself. Equivalent to calling `freeOnlyItems` followed by `free` on the container.
fnbool isContainerType(T)() @__ctfe @safe nothrow
fnbool isBasicContainerType(T)() @__ctfe @safe nothrow
fnbool isBufferContainerType(T)() @__ctfe @safe nothrow
fnbool isFixedContainerType(T)() @__ctfe @safe nothrow
fnbool isSparseContainerPartsValid(T, D)() @__ctfe @safe nothrow
fnbool isGenContainerPartsValid(T, D, G)() @__ctfe @safe nothrow
fnbool isLStrType(T)() @__ctfe @safe nothrow
fnbool isBStrType(T)() @__ctfe @safe nothrow
fnbool isFStrType(T)() @__ctfe @safe nothrow
fnbool isStrContainerType(T)() @__ctfe @safe nothrow

Variables 3

varMemoryContext __memoryContext
enumvardefaultJokaMemoryAlignment = 16
enumvardefaultListCapacity = 8

The default list capacity. It is also the smallest list capacity.