(MOD) Refinements and widened extendibilities for Status

This commit is contained in:
William
2024-04-13 17:55:01 +08:00
parent b97887f6be
commit 9877602ffa
3 changed files with 92 additions and 0 deletions

35
MemMan/src/memman.c Normal file
View File

@@ -0,0 +1,35 @@
#include <Compound/common.h>
#include <Compound/memman.h>
/*
enum {
MEMMAN_RELEASE_LEVEL_INSTANTAL = 0,
MEMMAN_RELEASE_LEVEL_STACK = 1,
MEMMAN_RELEASE_LEVEL_HEAP = 2
};
typedef struct {
void *addr;
int release_level;
} Memory;
typedef struct {
Memory *members;
int release_level;
} MemoryPool;
typedef struct {
MemoryPool *members;
void *(*allocator)(size_t sz);
void (*delocator)(void *addr);
} MemoryPoolManager;
*/
int memman_memorypoolmanager_create(MemoryPoolManager *inst,
MemoryPool **membersptr)
{
fails(inst, COMMON_ERROR_INVALID_ARGUMENT);
fails(membersptr, COMMON_ERROR_INVALID_ARGUMENT);
}