This commit is contained in:
Hongze Cheng 2021-10-09 16:42:44 +08:00
parent a7e15c32c1
commit 0eb6d29210
1 changed files with 2 additions and 3 deletions

View File

@ -22,7 +22,6 @@
extern "C" { extern "C" {
#endif #endif
typedef struct SVMANode SVMANode;
typedef struct SVnodeMemAllocator SVnodeMemAllocator; typedef struct SVnodeMemAllocator SVnodeMemAllocator;
SVnodeMemAllocator *VMACreate(size_t size /* base size */, size_t ssize /* step size */, SVnodeMemAllocator *VMACreate(size_t size /* base size */, size_t ssize /* step size */,
@ -34,12 +33,12 @@ void VMAFree(SVnodeMemAllocator *pvma, void *ptr);
bool VMAIsFull(SVnodeMemAllocator *pvma); bool VMAIsFull(SVnodeMemAllocator *pvma);
// ------------------ FOR TEST ONLY ------------------ // ------------------ FOR TEST ONLY ------------------
struct SVMANode { typedef struct SVMANode {
struct SVMANode *prev; struct SVMANode *prev;
size_t tsize; size_t tsize;
size_t used; size_t used;
char data[]; char data[];
}; } SVMANode;
struct SVnodeMemAllocator { struct SVnodeMemAllocator {
bool full; // if allocator is full bool full; // if allocator is full