core.internal.gc.blockmeta
Functions to manipulate metadata in-block.
functionality was moved from rt.lifetime
Functions 14
fn
bool __setArrayAllocLength(ref BlkInfo info, size_t newlength, bool isshared, const TypeInfo tinext, size_t oldlength = size_t.max) pure nothrowSet the allocated length of the array block. This is called any time an array is appended to or its length is set.fn
bool __setArrayAllocLengthImpl(ref BlkInfo info, size_t newlength, bool isshared, size_t oldlength, size_t typeInfoSize) pure nothrowfn
void __setBlockFinalizerInfo(ref BlkInfo info, const TypeInfo ti) pure nothrowThe block finalizer info is set separately from the array length, as that is only needed on the initial setup of the block. No shared is needed, since this should only happen when the block is new....fn
const(TypeInfo) __getBlockFinalizerInfo(ref BlkInfo info) pure nothrowGet the finalizer info from the block (typeinfo). If called on a block, without STRUCTFINAL set, returns null.fn
size_t __arrayAllocLength(ref BlkInfo info) pure nothrowget the used size of the array for the given blockfn
size_t __arrayAllocLengthAtomic(ref BlkInfo info) pure nothrowAtomically get the used size of the array for the given blockfn
size_t __arrayAllocCapacity(ref BlkInfo info) pure nothrowGet the maximum bytes that can be stored in the given block.fn
size_t __arrayPad(size_t size, const TypeInfo tinext) nothrow pure @trustedget the padding required to allocate size bytes. Note that the padding is NOT included in the passed in size. Therefore, do NOT call this function with the size of an allocated block.fn
size_t __allocPad(size_t size, uint bits) nothrow pure @trustedget the padding required to allocate size bytes, use the bits to determine which metadata must be stored.fn
void *__arrayStart __arrayStart()(return scope BlkInfo info) nothrow pureGet the start of the array for the given block.fn
void __trimExtents(ref scope void * base, ref size_t blockSize, uint attr) nothrow pure @nogcTrim a block's extents to the known valid data that is not metadata. This takes into account the finalizer and array metadata.