1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-08 03:28:20 +02:00
Beef/BeefySysLib/util/Heap.h
2021-11-26 17:59:58 -08:00

33 lines
No EOL
417 B
C++

#pragma once
#include "../Common.h"
NS_BF_BEGIN
class ContiguousHeap
{
public:
typedef int AllocRef;
public:
void* mMetadata;
int mMemorySize;
int mBlockDataOfs;
Array<AllocRef> mFreeList;
int mFreeIdx;
public:
ContiguousHeap();
virtual ~ContiguousHeap();
void Clear(int maxAllocSize = -1);
AllocRef Alloc(int size);
bool Free(AllocRef ref);
void Validate();
void DebugDump();
};
NS_BF_END