gwnavruntime/kernel/HeapPT/HeapPT_Bookkeeper.h Source File
Go to the documentation of this file.
18 #ifndef INC_KY_Kernel_HeapPT_Bookkeeper_H
19 #define INC_KY_Kernel_HeapPT_Bookkeeper_H
26 namespace Kaim {
namespace HeapPT {
37 typedef List<HeapSegment> SegmentListType;
39 Bookkeeper(SysAllocPaged* sysAlloc, UPInt granularity = Heap_PageSize);
41 SysAllocPaged* GetSysAlloc() {
return pSysAlloc; }
43 void* Alloc(UPInt size);
44 void Free(
void* ptr, UPInt size);
46 void VisitMem(MemVisitor* visitor,
unsigned flags)
const;
47 void VisitSegments(SegVisitor* visitor)
const;
49 UPInt GetFootprint()
const {
return Footprint; }
50 UPInt GetUsedSpace()
const {
return Footprint - Allocator.GetTotalFreeSpace(); }
53 UPInt getHeaderSize(UPInt dataSize)
const;
54 HeapSegment* allocSegment(UPInt size);
55 void freeSegment(HeapSegment* seg);
57 SysAllocPaged* pSysAlloc;
59 SegmentListType SegmentList;
60 AllocBitSet1 Allocator;
Definition: gamekitcrowddispersion.h:20