Convenient wrapper for WinAPI heap functions.
Returns default heap of the calling process.
This struct encapsulates heap manipulation functionality.
This struct is neither default constructable nor copyable. Pass it by ref to functions or use std.typecons.RefCounted.
Heap construction options.
No flags.
Add HEAP_CREATE_ENABLE_EXECUTE flag.
Add HEAP_GENERATE_EXCEPTIONS flag.
Add HEAP_NO_SERIALIZE flag.
General heap usage flags.
No flags.
Add HEAP_GENERATE_EXCEPTIONS flag.
Add HEAP_NO_SERIALIZE flag.
Construct a new Heap.
Wrapper for HeapCreate.
Construct a Heap from a heapHandle.
If own is true destroys the heapHandle on destruction using HeapDestroy.
Returns whether this is associated with a heap handle. It is asserted that no member functions are called for an unassociated Heap struct.
assert(processHeap.associated); assert(!Heap.init.associated); auto h = Heap.init.handle; // assertion failure
Gets the handle of the associated heap.
Returns whether handle of the associated heap will be destroyed on destruction.
Allocates a block of memory.
Wrapper for HeapAlloc.
Reallocates a block of memory (i.e. memory content is preserved).
Wrapper for HeapReAlloc.
Frees a block of memory.
Wrapper for HeapFree. Also fixes HeapFree bug, see "Community Additions" section of function page.
Retrieves the size of an allocated from this heap memory block.
Wrapper for HeapSize.
An unaligned thread local allocator interface implementation for Heap.
Can be constructed using the same arguments as Heap.
Underlying Heap can be accessed via heap property.
See also unstd.memory.allocation.isUnalignedAllocator.