module vrt.gc.manager.gigaman

GigaMan reserves a gigabyte of memory and allocates slabs from that using a buddy allocator.

Code Map

//! GigaMan reserves a gigabyte of memory and allocates slabs from that
//! using a buddy allocator.
module vrt.gc.manager.gigaman;


struct GigaMan
{
public:
	fn setup(totalArenaSize: size_t) { }
	fn treeVisit(dlg: scope (RBTree.VisitDg)) { }
	fn remove(ln: LinkedNode*) { }
	fn treeInsert(n: UnionNode*, compare: scope (RBTree.CompDg)) { }
	fn getExtentFromPtr(ptr: void*) Extent* { }
	fn totalSize() size_t { }
	fn prepareForCollect() { }
	fn shutdown() { }
	fn allocSlabStruct(associatedPtr: void*, associatedSz: size_t) Slab* { }
	fn allocLargeStruct(associatedPtr: void*, associatedSz: size_t) Large* { }
	fn freeSlabStructAndMem(slab: Slab*, shutdown: bool) { }
	fn freeLargeStructAndMem(large: Large*, shutdown: bool) { }
	fn freeInternalStruct(slab: Slab*) { }
	//! Allocates a chunk of memory from the OS.
	fn allocMemoryFromOS(n: size_t) void* { }
	fn freeMemoryToOS(ptr: void*, n: size_t) { }
	fn setLowestPointer() { }
	fn setHighestPointer() { }
	fn compareExtent(n1: Node*, n2: Node*) i32 { }
	fn alwaysHit(Node*, Node*) i32 { }
	//! Does n contain an empty Slab?
	fn emptySlab(n: Node*) bool { }


public:
	static fn allocGC(sz: size_t) void* { }
}