-
Notifications
You must be signed in to change notification settings - Fork 105
Open
Labels
wontfixThis will not be worked onThis will not be worked on
Description
初始化内存池时,此时内存池作为一个大的空闲块,其尾部也应该有指针指向首地址,此次没有相应操作
像这样:
*(mp_chunk**)((char*)ck + ck->size - MP_CHUNK_POINTER) = ck;
#define MP_INIT_MEMORY_STRUCT(mm, mempool_sz) \
do { \
mm->mempool_size = mempool_sz; \
mm->alloc_mem = 0; \
mm->alloc_prog_mem = 0; \
mm->free_list = (_MP_Chunk*) mm->start; \
mm->free_list->is_free = 1; \
mm->free_list->alloc_mem = mempool_sz; \
mm->free_list->prev = NULL; \
mm->free_list->next = NULL; \
mm->alloc_list = NULL; \
} while (0)Metadata
Metadata
Assignees
Labels
wontfixThis will not be worked onThis will not be worked on