refact
This commit is contained in:
parent
a7e15c32c1
commit
0eb6d29210
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue