module vrt.gc.util.buddy

A simple buddy allocator, only does tracking of which blocks are free

Code Map

//! A simple buddy allocator, only does tracking of which blocks are free
module vrt.gc.util.buddy;


struct GigaBuddy
{
public:
	enum MinOrder;
	enum MaxOrder;
	enum NumLevels;
	enum MinNumBits;
	enum MaxNumBits;
	enum NumBitsPerElm;
	enum NumBits;
	enum NumElems;


public:
	fn setup() { }
	fn reserveStart(n: size_t) { }
	fn canAlloc(order: size_t) bool { }
	fn alloc(order: size_t) size_t { }
	fn free(order: size_t, n: size_t) { }
}

fn countLeadingZeros(bits: u8, isZeroUndef: bool) u8;