Lines Matching refs:num_blocks
16 static void *alloc_blocks(sys_mem_blocks_t *mem_block, size_t num_blocks) in alloc_blocks() argument
27 r = sys_bitarray_alloc(mem_block->bitmap, num_blocks, &offset); in alloc_blocks()
37 mem_block->info.used_blocks += (uint32_t)num_blocks; in alloc_blocks()
54 size_t num_blocks) in free_blocks() argument
67 if (offset >= mem_block->info.num_blocks) { in free_blocks()
75 ret = sys_bitarray_free(mem_block->bitmap, num_blocks, offset); in free_blocks()
79 mem_block->info.used_blocks -= (uint32_t)num_blocks; in free_blocks()
103 if (count > mem_block->info.num_blocks) { in sys_mem_blocks_alloc_contiguous()
142 if (count > mem_block->info.num_blocks) { in sys_mem_blocks_alloc()
187 __ASSERT_NO_MSG(offset + count <= mem_block->info.num_blocks); in sys_mem_blocks_is_region_free()
211 if (offset + count > mem_block->info.num_blocks) { in sys_mem_blocks_get()
268 if (count > mem_block->info.num_blocks) { in sys_mem_blocks_free()
311 if (count > mem_block->info.num_blocks) { in sys_mem_blocks_free_contiguous()
369 if (count > allocator->info.num_blocks) { in sys_multi_mem_blocks_alloc()
410 one_alloc->info.num_blocks); in sys_multi_mem_blocks_free()
439 stats->free_bytes = (mem_block->info.num_blocks << in sys_mem_blocks_runtime_stats_get()
487 ptr->free_bytes = (block->info.num_blocks - block->info.used_blocks) << in sys_mem_blocks_stats_query()