GC

Undocumented in source.

Members

Functions

addRange
void addRange(void* p, size_t sz, TypeInfo ti)

add range to scan for roots

addRoot
void addRoot(void* p)

add p to list of roots

addrOf
void* addrOf(void* p)

Determine the base address of the block containing p. If p is not a gc allocated pointer, return null.

allocatedInCurrentThread
ulong allocatedInCurrentThread()

Returns the number of bytes allocated for the current thread since program start. It is the same as GC.stats().allocatedInCurrentThread, but faster.

clrAttr
uint clrAttr(void* p, uint mask)
collect
void collect()
collectNoStack
void collectNoStack()
disable
void disable()
enable
void enable()
extend
size_t extend(void* p, size_t minsize, size_t maxsize, TypeInfo ti)

Attempt to in-place enlarge the memory block pointed to by p by at least minsize bytes, up to a maximum of maxsize additional bytes. This does not attempt to move the memory block (like realloc() does).

free
void free(void* p)
getAttr
uint getAttr(void* p)
malloc
void* malloc(size_t size, uint bits, TypeInfo ti)
minimize
void minimize()

minimize free space usage

profileStats
core.memory.GC.ProfileStats profileStats()

Retrieve profile statistics about garbage collection. Useful for debugging and tuning.

query
BlkInfo query(void* p)

Determine the base address of the block containing p. If p is not a gc allocated pointer, return null.

removeRange
void removeRange(void* p)

remove range

removeRoot
void removeRoot(void* p)

remove p from list of roots

reserve
size_t reserve(size_t size)
runFinalizers
void runFinalizers(void[] segment)

run finalizers

setAttr
uint setAttr(void* p, uint mask)
sizeOf
size_t sizeOf(void* p)

Determine the allocated size of pointer p. If p is an interior pointer or not a gc allocated pointer, return 0.

stats
core.memory.GC.Stats stats()

Retrieve statistics about garbage collection. Useful for debugging and tuning.

Properties

rangeIter
RangeIterator rangeIter [@property getter]
rootIter
RootIterator rootIter [@property getter]

Meta