• Home
  • Raw
  • Download

Lines Matching refs:block

73   struct ufdt_node_pool_block_header *block = pool->first_block;  in ufdt_node_pool_destruct()  local
74 while (block != NULL) { in ufdt_node_pool_destruct()
75 if (block->alloc_entry_cnt != 0) is_leak = 1; in ufdt_node_pool_destruct()
77 struct ufdt_node_pool_block_header *next_block = block->next_block; in ufdt_node_pool_destruct()
78 dto_free(block); in ufdt_node_pool_destruct()
79 block = next_block; in ufdt_node_pool_destruct()
95 struct ufdt_node_pool_block_header *block = in _ufdt_node_pool_create_block() local
99 struct ufdt_node_pool_entry_header **next_ptr = &block->first_free_entry; in _ufdt_node_pool_create_block()
111 block->next_block = NULL; in _ufdt_node_pool_create_block()
112 block->alloc_entry_cnt = 0; in _ufdt_node_pool_create_block()
114 return block; in _ufdt_node_pool_create_block()
118 struct ufdt_node_pool_block_header *block) { in _ufdt_node_pool_destory_block() argument
119 dto_free(block); in _ufdt_node_pool_destory_block()
123 struct ufdt_node_pool_block_header *block) { in _ufdt_node_pool_block_alloc() argument
125 struct ufdt_node_pool_entry_header *entry = block->first_free_entry; in _ufdt_node_pool_block_alloc()
127 block->first_free_entry = entry->next; in _ufdt_node_pool_block_alloc()
128 block->alloc_entry_cnt++; in _ufdt_node_pool_block_alloc()
133 static void _ufdt_node_pool_block_free(struct ufdt_node_pool_block_header *block, in _ufdt_node_pool_block_free() argument
137 entry->next = block->first_free_entry; in _ufdt_node_pool_block_free()
139 block->first_free_entry = entry; in _ufdt_node_pool_block_free()
140 block->alloc_entry_cnt--; in _ufdt_node_pool_block_free()
144 struct ufdt_node_pool *pool, struct ufdt_node_pool_block_header *block) { in _ufdt_node_pool_preppend_block() argument
146 block->next_block = origin_first_block; in _ufdt_node_pool_preppend_block()
148 pool->first_block = block; in _ufdt_node_pool_preppend_block()
150 pool->last_block_ptr = &block->next_block; in _ufdt_node_pool_preppend_block()
155 struct ufdt_node_pool *pool, struct ufdt_node_pool_block_header *block) { in _ufdt_node_pool_append_block() argument
156 block->next_block = NULL; in _ufdt_node_pool_append_block()
158 *pool->last_block_ptr = block; in _ufdt_node_pool_append_block()
159 pool->last_block_ptr = &block->next_block; in _ufdt_node_pool_append_block()
165 struct ufdt_node_pool_block_header *block = *block_ptr; in _ufdt_node_pool_remove_block() local
166 struct ufdt_node_pool_block_header *next_block = block->next_block; in _ufdt_node_pool_remove_block()
173 block->next_block = NULL; in _ufdt_node_pool_remove_block()
183 struct ufdt_node_pool_block_header *block = pool->first_block; in ufdt_node_pool_alloc() local
184 if (block == NULL || block->first_free_entry == NULL) { in ufdt_node_pool_alloc()
185 block = _ufdt_node_pool_create_block(); in ufdt_node_pool_alloc()
186 _ufdt_node_pool_preppend_block(pool, block); in ufdt_node_pool_alloc()
189 void *node = _ufdt_node_pool_block_alloc(block); in ufdt_node_pool_alloc()
192 if (block->first_free_entry == NULL && *pool->last_block_ptr != block) { in ufdt_node_pool_alloc()
194 _ufdt_node_pool_append_block(pool, block); in ufdt_node_pool_alloc()
204 struct ufdt_node_pool_block_header *block = *block_ptr; in _ufdt_node_pool_search_block() local
206 (char *)block + sizeof(struct ufdt_node_pool_block_header); in _ufdt_node_pool_search_block()
207 const char *block_buf_end = (char *)block + UFDT_NODE_POOL_BLOCK_SIZE; in _ufdt_node_pool_search_block()
213 block_ptr = &block->next_block; in _ufdt_node_pool_search_block()
230 struct ufdt_node_pool_block_header *block = *block_ptr; in ufdt_node_pool_free() local
231 _ufdt_node_pool_block_free(block, node); in ufdt_node_pool_free()
236 if (block->alloc_entry_cnt == 0 && pool->first_block != NULL && in ufdt_node_pool_free()
238 _ufdt_node_pool_destory_block(block); in ufdt_node_pool_free()
242 _ufdt_node_pool_preppend_block(pool, block); in ufdt_node_pool_free()