1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-09 12:02:21 +02:00
Beef/BeefySysLib/util/Heap.h
2020-12-17 04:51:05 -08:00

32 lines
No EOL
399 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 DebugDump();
};
NS_BF_END