std.experimental.allocator.gc_allocator
D's built-in garbage-collected allocator.
struct GCAllocator
Types 1
structGCAllocator
D's built-in garbage-collected allocator.
Fields
uint alignmentThe alignment is a static constant equal to `platformAlignment`, which ensures proper alignment for any D data type.GCAllocator instanceReturns the global instance of this allocator type. The garbage collected allocator is thread-safe, therefore all of its methods and `instance` itself are `shared`.Methods
void[] allocate(size_t bytes) pure nothrow @trusted shared constStandard allocator methods per the semantics defined above. The deallocate and `reallocate` methods are `@system` because they may move memory around, leaving dangling pointers in user code.Ternary resolveInternalPointer(const void * p, ref void[] result) pure nothrow @trusted @nogc shared constDitto