This module provide support for aligned memory.
Allocates an aligned memory chunk.
Functionally equivalent to Visual C++ aligned_malloc.
Frees aligned memory allocated by alignedMalloc or alignedRealloc.
Functionally equivalent to Visual C++ aligned_free.
Reallocates an aligned memory chunk allocated by alignedMalloc or alignedRealloc.
Functionally equivalent to Visual C++ aligned_realloc.
Destructors called by the GC enjoy a variety of limitations and
relying on them is dangerous.
class Resource { ~this() { if (!alreadyClosed) { if (isCalledByGC()) assert(false, "Resource release relies on Garbage Collection"); alreadyClosed = true; releaseResource(); } } }
Crash if the GC is running.
Useful in destructors to avoid reliance GC resource release.
Allocates and construct a struct or class object.
Destroys and frees a class object created with mallocEmplace.
Destroys and frees a non-class object created with mallocEmplace.
Inserts a breakpoint instruction. useful to trigger the debugger.
Must return -1 if a < b
0 if a == b
1 if a > b
@nogc quicksort
From the excellent: http://codereview.stackexchange.com/a/77788