prime/include/Kyoto/Alloc/CMediumAllocPool.hpp

35 lines
722 B
C++
Raw Normal View History

#ifndef _CMEDIUMALLOCPOOL
#define _CMEDIUMALLOCPOOL
2022-09-20 04:35:24 +00:00
#include <rstl/list.hpp>
class CMediumAllocPool {
public:
struct SMediumAllocPuddle {
uchar unk;
void* x4_mainData;
void* x8_bookKeeping;
void* xc_cachedBookKeepingOffset;
int x10_;
int x14_numBlocks;
int x18_numAllocs;
int x1c_numEntries;
};
2022-09-20 04:35:24 +00:00
rstl::list< SMediumAllocPuddle > x0_list;
/*rstl::list_node<SMediumAllocPuddle>* x18_lastNodePrev; */
void* x18_lastNodePrev;
void* Alloc(uint size);
bool HasPuddles() const;
void AddPuddle(uint, void*, int);
void ClearPuddles();
2022-09-20 04:35:24 +00:00
int Free(const void* ptr);
2022-09-20 04:35:24 +00:00
uint GetTotalEntries();
uint GetNumBlocksAvailable();
uint GetNumAllocs();
2022-09-20 04:35:24 +00:00
};
#endif // _CMEDIUMALLOCPOOL