log管理器内存分配池化,修复部分log写入部分与内存池部分存在的恶性bug
This commit is contained in:
@ -3,7 +3,7 @@
|
||||
#include "config.h"
|
||||
#include <stdatomic.h>
|
||||
|
||||
#define FREE 1
|
||||
#define MEM_FREE 1
|
||||
#define INUSE -1
|
||||
#define PROCESSING 0
|
||||
|
||||
@ -25,9 +25,9 @@ typedef struct mem_ctl
|
||||
atomic_int Loglast_loc;
|
||||
atomic_int mem_e_indicator;//内存不足指示器
|
||||
//获取一个内存块
|
||||
mem_block* (*GetBlock)(struct mem_ctl*,int);
|
||||
void** (*GetBlock)(struct mem_ctl*,int);
|
||||
//释放一个内存块
|
||||
int (*FreeBlock)(struct memctl*,mem_block*);
|
||||
int (*FreeBlock)(struct mem_ctl*,void**);
|
||||
}mem_ctl;
|
||||
|
||||
int init_memctl(mem_ctl *self);
|
||||
|
||||
Reference in New Issue
Block a user