20260829 Redesign
This commit is contained in:
@@ -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*/
|
||||
Reference in New Issue
Block a user