Lines Matching refs:heap
15 The simplest way to define a heap is statically, with the
26 Memory can be allocated from a heap using :c:func:`k_heap_alloc`,
27 passing it the address of the heap object and the number of bytes
31 The heap supports blocking operation, allowing threads to go to sleep
43 returned by :c:func:`k_heap_alloc` for the same heap. Freeing a
56 functions on a single heap must be serialized by the caller.
71 The heap code takes reasonable care to avoid fragmentation. Free
76 allocations are freed and added to the heap, they are automatically
80 heap memory, including the variable-length list of bucket list heads
81 (which depend on heap size). The only external memory required is the
88 The heap code takes care to present high performance and reliable
104 want to manage dynamically as a "heap". For example, the memory might
112 via :c:func:`sys_multi_heap_init`, after which each heap can be added
115 applications that want to destroy a multi heap should simply ensure
124 uninspected by the multi heap code itself; instead it is passed to a
134 enlarged on the heap where it currently resides,
137 When unused, a multi heap may be freed via
145 The :dfn:`system heap` is a predefined memory allocator that allows
149 Only a single system heap is defined. Unlike other heaps or memory
150 pools, the system heap cannot be directly referenced using its
153 The size of the system heap is configurable to arbitrary sizes,
156 A thread can dynamically allocate a chunk of heap memory by calling
159 chunk of heap memory cannot be found ``NULL`` is returned.
161 When the thread is finished with a chunk of heap memory it can release
162 the chunk back to the system heap by calling :c:func:`k_free`.
167 The size of the heap memory pool is specified using the
170 By default, the heap memory pool size is zero bytes. This value instructs
171 the kernel not to define the heap memory pool object. The maximum size is limited
184 when optimizing the heap size and the minimum requirement can be more accurately
190 A chunk of heap memory is allocated by calling :c:func:`k_malloc`.
192 The following code allocates a 200 byte chunk of heap memory, then fills it
210 A chunk of heap memory is released by calling :c:func:`k_free`.
226 Use the heap memory pool to dynamically allocate memory in a