Lines Matching refs:malloc_mem_chunk_t

30 typedef struct malloc_mem_chunk_t  struct
33 struct malloc_mem_chunk_t *prev; // 上一个结点的指针 argument
34 struct malloc_mem_chunk_t *next; // 下一个结点的指针 argument
35 } malloc_mem_chunk_t; typedef
43 static malloc_mem_chunk_t *malloc_free_list = NULL;
44 static malloc_mem_chunk_t *malloc_free_list_end = NULL; // 空闲链表的末尾结点
53 static void malloc_insert_free_list(malloc_mem_chunk_t *ck);
67 static malloc_mem_chunk_t *malloc_query_free_chunk_bf(uint64_t size) in malloc_query_free_chunk_bf()
76 malloc_mem_chunk_t *ptr = malloc_free_list; in malloc_query_free_chunk_bf()
77 malloc_mem_chunk_t *best = NULL; in malloc_query_free_chunk_bf()
107 static malloc_mem_chunk_t *malloc_query_free_chunk_ff(uint64_t size) in malloc_query_free_chunk_ff()
111 malloc_mem_chunk_t *ptr = malloc_free_list; in malloc_query_free_chunk_ff()
158 malloc_mem_chunk_t *new_ck = (malloc_mem_chunk_t *)brk_managed_addr; in malloc_enlarge()
178 malloc_mem_chunk_t *ptr = malloc_free_list->next; in malloc_merge_free_chunk()
204 static void malloc_insert_free_list(malloc_mem_chunk_t *ck) in malloc_insert_free_list()
216 malloc_mem_chunk_t *ptr = malloc_free_list; in malloc_insert_free_list()
275 if (size + sizeof(uint64_t) <= sizeof(malloc_mem_chunk_t)) in malloc()
276 size = sizeof(malloc_mem_chunk_t); in malloc()
281 malloc_mem_chunk_t *ck = malloc_query_free_chunk_bf(size); in malloc()
328 if ((int64_t)(ck->length) - size > sizeof(malloc_mem_chunk_t)) in malloc()
331 malloc_mem_chunk_t *new_ck = (malloc_mem_chunk_t *)(((uint64_t)ck) + size); in malloc()
380 malloc_mem_chunk_t *ck = (malloc_mem_chunk_t *)((uint64_t)ptr - sizeof(uint64_t)); in free()