Lines Matching +full:block +full:- +full:size
4 * SPDX-License-Identifier: Apache-2.0
21 static void *smh_choice(struct sys_multi_heap *mheap, void *cfg, size_t align, size_t size) in smh_choice() argument
25 void *block; in smh_choice() local
29 if (attr >= MAX_SHARED_MULTI_HEAP_ATTR || size == 0) { in smh_choice()
33 /* Set in case the user requested a non-existing attr */ in smh_choice()
34 block = NULL; in smh_choice()
39 if (h->heap == NULL) { in smh_choice()
43 block = sys_heap_aligned_alloc(h, align, size); in smh_choice()
44 if (block != NULL) { in smh_choice()
49 return block; in smh_choice()
58 attr = region->attr; in shared_multi_heap_add()
61 return -EINVAL; in shared_multi_heap_add()
66 return -ENOMEM; in shared_multi_heap_add()
72 sys_heap_init(h, (void *) region->addr, region->size); in shared_multi_heap_add()
80 void shared_multi_heap_free(void *block) in shared_multi_heap_free() argument
82 sys_multi_heap_free(&shared_multi_heap, block); in shared_multi_heap_free()
110 return -EALREADY; in shared_multi_heap_pool_init()