20260829 Redesign

This commit is contained in:
2026-08-29 00:53:40 +08:00
parent f9345bdc0a
commit bf5fc3bda6
44 changed files with 2941 additions and 1 deletions
+26
View File
@@ -0,0 +1,26 @@
#ifndef INCLUDED_C_FIXEDPOOL_H
#define INCLUDED_C_FIXEDPOOL_H
#ifndef INCLUDED_C_TYPES_H
#include <c_Types.h>
#endif /*INCLUDED_C_TYPES_H*/
/* ------------------------------------------------------------------------------------------------------------------ */
/* */
typedef struct {
int objSize;
c_int_t instanceCount;
struct c_FixedPoolLink_t{ struct c_FixedPoolLink_t* next;} * freelist;
}c_FixedPool_t;
c_err_t c_FixedPool_Init(c_FixedPool_t* self, int objSize, void* block, int block_size);
void c_FixedPool_Destroy(c_FixedPool_t* self);
c_err_t c_FixedPool_AddBlock(c_FixedPool_t* self, void* block, int block_size);
void* c_FixedPool_Alloc(c_FixedPool_t* self);
void c_FixedPool_Free(c_FixedPool_t* self, void* ptr);
void c_FixedPool_DryUp(c_FixedPool_t* self);
#endif /*INCLUDED_C_FIXEDPOOL_H*/