Pool

Undocumented in source.

Members

Functions

Dtor
void Dtor()
Undocumented in source. Be warned that the author may not have intended to support it.
Invariant
bool Invariant()
Undocumented in source. Be warned that the author may not have intended to support it.
allocPages
size_t allocPages(size_t n)

Allocate n pages from Pool. Returns OPFAIL on failure.

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

Find base address of block containing pointer p. Returns null if the pointer doesn't belong to this pool

findSize
size_t findSize(void* p)

Find size of pointer p. Returns 0 if p doesn't belong to this pool if if it's block size is less than a PAGE.

freePages
void freePages(size_t pagenum, size_t npages)

Free npages pages starting with pagenum.

initialize
void initialize(size_t npages)
Undocumented in source. Be warned that the author may not have intended to support it.
opCmp
int opCmp(Pool other)

Used for sorting pools

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

Variables

baseAddr
byte* baseAddr;
Undocumented in source.
bin
Bins bin;
Undocumented in source.
cached_ptr
void* cached_ptr;
Undocumented in source.
cached_size
size_t cached_size;

Cache for findSize()

finals
GCBits finals;
Undocumented in source.
freebits
GCBits freebits;
Undocumented in source.
i
size_t i;
Undocumented in source.
mark
GCBits mark;
Undocumented in source.
noscan
GCBits noscan;
Undocumented in source.
npages
size_t npages;
Undocumented in source.
pagetable
ubyte* pagetable;
Undocumented in source.
scan
GCBits scan;
Undocumented in source.
topAddr
byte* topAddr;
Undocumented in source.

Meta