Lines Matching +full:block +full:- +full:size

2  * SPDX-License-Identifier: Apache-2.0
13 * @defgroup multi_heap_wrapper Multi-Heap Wrapper
19 * @brief Multi-heap allocator
29 * in backend, which is then provided to a user-specified "choice"
36 * @brief Multi-heap choice function
38 * This is a user-provided functions whose responsibility is selecting
43 * allocation, and may choose to pad the user-provided values as
50 * @param mheap Multi-heap structure.
51 * @param cfg An opaque user-provided value. It may be interpreted in
54 * @param size The user-specified allocation size in bytes
58 size_t align, size_t size);
73 * @brief Initialize multi-heap
81 * semi-statically from system configuration (for example, via
82 * linker-provided bounds on available memory in different regions, or
83 * from devicetree definitions of hardware-provided addressable
84 * memory, etc...). The general expectation is that a soc- or
85 * board-level platform device will be initialized at system boot from
87 * will assemble a multi-heap on its own.
101 * and determine which heap (if any) from which a freed block was
113 * Just as for sys_heap_alloc(), allocates a block of memory of the
114 * specified size in bytes. Takes an opaque configuration pointer
120 * @param bytes Requested size of the allocation, in bytes
128 * Just as for sys_multi_heap_alloc(), allocates a block of memory of
129 * the specified size in bytes. Takes an additional parameter
135 * @param bytes Requested size of the allocation, in bytes
148 * @param addr address to be found, must be a pointer to a block allocated by sys_multi_heap_alloc
158 * Returns the specified block, which must be the return value of a
163 * Accepts NULL as a block parameter, which is specified to have no
167 * @param block Block to free, must be a pointer to a block allocated by sys_multi_heap_alloc
169 void sys_multi_heap_free(struct sys_multi_heap *mheap, void *block);
171 /** @brief Expand the size of an existing allocation on the multi heap
174 * but a different allocated size. If the new allocation can be
176 * Otherwise the data will be copies to a new block and the old one
177 * will be freed as per sys_heap_free(). If the specified size is
178 * smaller than the original, the block will be truncated in place and
180 * new block fails, then NULL will be returned and the old block will
188 * @param bytes Number of bytes requested for the new block