Lines Matching +full:memory +full:- +full:alignment

4  * SPDX-License-Identifier: Apache-2.0
22 * power-of-two buckets.
26 * bytes for heaps >256kb or on 64 bit systems), plus a log2-sized
27 * array of 2-word bucket headers. No coarse alignment restrictions
31 * Simple API. Initialize at runtime with any blob of memory and not
32 * a macro-generated, carefully aligned static array. Allocate and
38 * to the smallest block guaranteed to fit. Split memory remaining in
44 * that has a compile-time-configurable upper bound, setting this to
52 * runtime lives in the heap memory itself and this struct simply
83 * @return -EINVAL if null pointers, otherwise 0
95 * @return -EINVAL if null pointer was passed, otherwise 0
103 * Initializes a sys_heap struct to manage the specified memory.
106 * @param mem Untyped pointer to unused memory
111 /** @brief Allocate memory from a sys_heap
113 * Returns a pointer to a block of unused memory in the heap. This
114 * memory will not otherwise be used until it is freed with
115 * sys_heap_free(). If no memory can be allocated, NULL will be
116 * returned. The allocated memory is guaranteed to have a starting
117 * address which is a multiple of sizeof(void *). If a bigger alignment
126 * @return Pointer to memory the caller can now use
130 /** @brief Allocate aligned memory from a sys_heap
133 * memory (if available) will have a starting address in memory which
134 * is a multiple of the specified power-of-two alignment value in
136 * The resulting memory can be returned to the heap using sys_heap_free().
139 * @param align Alignment in bytes, must be a power of two
141 * @return Pointer to memory the caller can now use
145 /** @brief Free memory into a sys_heap
147 * De-allocates a pointer to memory previously returned from
149 * caller must not use the memory region after entry to this function.
155 * @param heap Heap to which to return the memory
162 * Returns a pointer to a new memory region with the same contents,
168 * the remaining memory returned to the heap. If the allocation of a
174 * @param align Alignment in bytes, must be a power of two
176 * @return Pointer to memory the caller can now use, or NULL
184 /** @brief Return allocated memory size
188 * returned is the size of the heap-managed memory, which may be
191 * region of memory until a subsequent sys_heap_free() on the same
195 * @param mem Pointer to memory allocated from this heap
196 * @return Size in bytes of the memory region
242 * @param scratch_mem A pointer to scratch memory to be used by the
245 * @param scratch_bytes Size of the memory pointed to by @a scratch_mem
246 * @param target_percent Percentage fill value (1-100) to which the