gfm.core.memory

This module provide support for aligned memory.

Members

Aliases

nogcComparisonFunction
alias nogcComparisonFunction(T) = int delegate(in T a, in T b) nothrow @nogc

Must return -1 if a < b 0 if a == b 1 if a > b

Functions

alignedFree
void alignedFree(void* aligned)

Frees aligned memory allocated by alignedMalloc or alignedRealloc. Functionally equivalent to Visual C++ _aligned_free.

alignedMalloc
void* alignedMalloc(size_t size, size_t alignment)

Allocates an aligned memory chunk. Functionally equivalent to Visual C++ _aligned_malloc.

alignedRealloc
void* alignedRealloc(void* aligned, size_t size, size_t alignment)

Reallocates an aligned memory chunk allocated by alignedMalloc or alignedRealloc. Functionally equivalent to Visual C++ _aligned_realloc.

debugBreak
void debugBreak()

Inserts a breakpoint instruction. useful to trigger the debugger.

destroyFree
void destroyFree(T p)

Destroys and frees a class object created with mallocEmplace.

destroyFree
void destroyFree(T* p)

Destroys and frees a non-class object created with mallocEmplace.

mallocEmplace
auto mallocEmplace(Args args)

Allocates and construct a struct or class object.

nextAlignedPointer
void* nextAlignedPointer(void* start, size_t alignment)
nogc_qsort
void nogc_qsort(T[] array, nogcComparisonFunction!T comparison)

@nogc quicksort From the excellent: http://codereview.stackexchange.com/a/77788

stressGC
void stressGC()

Stresses the GC for a collect to occur, can be useful to reproduce bugs

Meta