Gcx

Undocumented in source.
struct Gcx {}

Members

Functions

Dtor
void Dtor()
Undocumented in source. Be warned that the author may not have intended to support it.
Invariant
void Invariant()
Undocumented in source. Be warned that the author may not have intended to support it.
addRange
void addRange(void* pbot, void* ptop)
addRoot
void addRoot(void* p)
allocPage
int allocPage(Bins bin)

Allocate a page of bin's.

bigAlloc
void* bigAlloc(size_t size)

Allocate a chunk of memory that is larger than a page. Return null if out of memory.

clrBits
void clrBits(Pool* pool, size_t biti, uint mask)
findBase
void* findBase(void* p)

Find base address of block containing pointer p. Returns null if not a gc'd pointer

findPool
Pool* findPool(void* p)

Find Pool that pointer is in. Return null if not in a Pool. Assume pooltable[] is sorted.

findSize
size_t findSize(void* p)

Find size of pointer p. Returns 0 if not a gc'd pointer

fullcollect
size_t fullcollect(void* stackTop)
fullcollectshell
size_t fullcollectshell()

Return number of full pages free'd.

getBits
uint getBits(Pool* pool, size_t biti)
getInfo
BlkInfo getInfo(void* p)
initialize
void initialize()
Undocumented in source. Be warned that the author may not have intended to support it.
log_collect
void log_collect()

Leak Detector *****

log_collect
void log_collect()
Undocumented in source. Be warned that the author may not have intended to support it.
log_free
void log_free(void* p)

Leak Detector *****

log_free
void log_free(void* p)
Undocumented in source. Be warned that the author may not have intended to support it.
log_init
void log_init()

Leak Detector *****

log_init
void log_init()
Undocumented in source. Be warned that the author may not have intended to support it.
log_malloc
void log_malloc(void* p, size_t size)

Leak Detector *****

log_malloc
void log_malloc(void* p, size_t size)
Undocumented in source. Be warned that the author may not have intended to support it.
log_parent
void log_parent(void* p, void* parent)

Leak Detector *****

log_parent
void log_parent(void* p, void* parent)
Undocumented in source. Be warned that the author may not have intended to support it.
mark
void mark(void* pbot, void* ptop)

Search a range of memory values and mark any pointers into the GC pool.

minimize
void minimize()

Minimizes physical memory usage by returning free pools to the OS.

newPool
Pool* newPool(size_t npages)

Allocate a new pool with at least npages in it. Sort it into pooltable[]. Return null if failed.

removeRange
void removeRange(void* pbot)
removeRoot
void removeRoot(void* p)
reserve
size_t reserve(size_t size)

Allocate a new pool of at least size bytes. Sort it into pooltable[]. Mark all memory in the pool as B_FREE. Return the actual number of bytes reserved or 0 on error.

setBits
void setBits(Pool* pool, size_t biti, uint mask)
thread_Invariant
void thread_Invariant()
Undocumented in source. Be warned that the author may not have intended to support it.
thread_Invariant
void thread_Invariant()
Undocumented in source. Be warned that the author may not have intended to support it.

Static functions

findBin
Bins findBin(size_t size)

Compute bin for size.

Variables

anychanges
uint anychanges;
Undocumented in source.
bucket
List* bucket;
Undocumented in source.
cached_info_key
void* cached_info_key;
Undocumented in source.
cached_info_val
BlkInfo cached_info_val;
Undocumented in source.
cached_size_key
void* cached_size_key;
Undocumented in source.
cached_size_val
size_t cached_size_val;
Undocumented in source.
collectBegin
void delegate() collectBegin;
Undocumented in source.
collectEnd
void delegate(int freed, int pagebytes) collectEnd;
Undocumented in source.
current
LogArray current;

Leak Detector *****

disabled
int disabled;
Undocumented in source.
i
size_t i;
Undocumented in source.
inited
uint inited;
Undocumented in source.
list
List* list;
Undocumented in source.
log
uint log;
Undocumented in source.
maxAddr
byte* maxAddr;
Undocumented in source.
minAddr
byte* minAddr;
Undocumented in source.
noStack
uint noStack;
Undocumented in source.
npools
size_t npools;
Undocumented in source.
nranges
size_t nranges;
Undocumented in source.
nroots
size_t nroots;
Undocumented in source.
pool
Pool* pool;
Undocumented in source.
pooltable
Pool** pooltable;
Undocumented in source.
prev
LogArray prev;

Leak Detector *****

rangedim
size_t rangedim;
Undocumented in source.
ranges
Range* ranges;
Undocumented in source.
rootdim
size_t rootdim;
Undocumented in source.
roots
void** roots;
Undocumented in source.
self
pthread_t self;
Undocumented in source.
stackBottom
void* stackBottom;
Undocumented in source.

Meta