Skip to content

Commit

Permalink
Update memorypool.c
Browse files Browse the repository at this point in the history
  • Loading branch information
userpro authored Sep 19, 2019
1 parent 65862fe commit 5455587
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions memorypool.c
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,6 @@ static _MP_Memory* find_memory_list(MemoryPool* mp, void* p) {
}

static int merge_free_chunk(MemoryPool* mp, _MP_Memory* mm, _MP_Chunk* c) {
if (mp == NULL || mm == NULL || c == NULL || !c->is_free) return 1;

_MP_Chunk *p0 = c, *p1 = c;
while (p0->is_free) {
p1 = p0;
Expand Down Expand Up @@ -360,4 +358,4 @@ float get_mempool_prog_usage(MemoryPool* mp) {
#undef MP_ALIGN_SIZE
#undef MP_INIT_MEMORY_STRUCT
#undef MP_DLINKLIST_INS_FRT
#undef MP_DLINKLIST_DEL
#undef MP_DLINKLIST_DEL

0 comments on commit 5455587

Please sign in to comment.