GC

Undocumented in source.

Members

Functions

Dtor
void Dtor()
Undocumented in source. Be warned that the author may not have intended to support it.
addRange
void addRange(void* p, size_t sz)

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.

addrOfNoSync
void* addrOfNoSync(void* p)
Undocumented in source. Be warned that the author may not have intended to support it.
calloc
void* calloc(size_t size, uint bits)
check
void check(void* p)

Verify that pointer p: 1) belongs to this memory pool 2) points to the start of an allocated piece of memory 3) is not on a free list

clrAttr
uint clrAttr(void* p, uint mask)
disable
void disable()
enable
void enable()
extend
size_t extend(void* p, size_t minsize, size_t maxsize)

Attempt to in-place enlarge the memory block pointed to by p by at least minbytes beyond its current capacity, up to a maximum of maxsize. This does not attempt to move the memory block (like realloc() does).

free
void free(void* p)
fullCollect
void fullCollect()

do full garbage collection

fullCollectNoStack
void fullCollectNoStack()

do full garbage collection ignoring roots

getAttr
uint getAttr(void* p)
getStats
void getStats(GCStats stats)

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

initialize
void initialize()
Undocumented in source. Be warned that the author may not have intended to support it.
malloc
void* malloc(size_t size, uint bits)
minimize
void minimize()

minimize free space usage

monitor
void monitor(void delegate() begin, void delegate(int, int) end)
Undocumented in source. Be warned that the author may not have intended to support it.
query
BlkInfo query(void* p)

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

queryNoSync
BlkInfo queryNoSync(void* p)
Undocumented in source. Be warned that the author may not have intended to support it.
realloc
void* realloc(void* p, size_t size, uint bits)
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)
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.

weakpointerCreate
void* weakpointerCreate(Object r)

Create a weak pointer to the given object. Returns a pointer to an opaque struct allocated in C memory.

weakpointerDestroy
void weakpointerDestroy(void* p)

Destroy a weak pointer returned by weakpointerCreate(). If null is passed, nothing happens.

weakpointerGet
Object weakpointerGet(void* p)

Query a weak pointer and return either the object passed to weakpointerCreate, or null if it was free'd in the meantime. If null is passed, null is returned.

Static variables

file
char* file;
Undocumented in source.
gcLock
ClassInfo gcLock;
Undocumented in source.
line
size_t line;
Undocumented in source.

Variables

gcversion
uint gcversion;
Undocumented in source.
gcx
Gcx* gcx;
Undocumented in source.

Meta