Report a bug
If you spot a problem with this page, click here to create a GitHub issue.
Improve this page
Quickly fork, edit online, and submit a pull request for this page. Requires a signed-in GitHub account. This works well for small changes. If you'd like to make larger changes you may want to consider using a local clone.

mir.internal.memory

Authors:
Andrei Alexandrescu, Ilya Yaroshenko (Mir rework of original Phobos code)
pure nothrow @nogc void* malloc(size_t size);
pure nothrow @nogc void* calloc(size_t nmemb, size_t size);
pure nothrow @nogc void* realloc(void* ptr, size_t size);
pure nothrow @nogc void free(void* ptr);
@trusted void* alignedAllocate()(size_t bytes, uint a);
Uses posix_memalign on Posix and _aligned_malloc on Windows.
alias alignedFree = free;
Calls free(b.ptr) on Posix and _aligned_free(b.ptr) on Windows.