Lines Matching full:memory
3 Memory Blocks Allocator
6 The Memory Blocks Allocator allows memory blocks to be dynamically
7 allocated from a designated memory region, where:
9 * All memory blocks have a single fixed size.
17 buffer (unlike memory slab). This allows the buffer to reside in
18 memory regions where these can be powered down to conserve energy.
27 Any number of Memory Blocks Allocator can be defined (limited only by
28 available RAM). Each allocator is referenced by its memory address.
30 A memory blocks allocator has the following key properties:
38 * A **buffer** that provides the memory for the memory slab's blocks.
44 larger than 2 (i.e. 4, 8, 16, ...). To ensure that all memory blocks in
49 each memory blocks allocator must be declared and defined at compile time.
57 The memory blocks allocator keeps track of unallocated blocks using
60 Memory Blocks Allocator
63 Internally, the memory blocks allocator uses a bitmap to keep track of
65 the ``sys_bitarray`` interface, gets memory blocks one by one from
68 buffer. This allows the memory region of the backing buffer to be
72 Multi Memory Blocks Allocator Group
75 The Multi Memory Blocks Allocator Group utility functions provide
84 To allocate memory blocks from group,
88 can be chosen. After an allocator is chosen, memory blocks are
91 Allocated memory blocks can be freed via
94 the passed in memory addresses to find the correct allocator
95 and then memory blocks are freed via :c:func:`sys_mem_blocks_free`.
100 Defining a Memory Blocks Allocator
103 A memory blocks allocator is defined using a variable of type
107 The following code defines and initializes a memory blocks allocator
115 Similarly, you can define a memory blocks allocator in private scope:
130 Allocating Memory Blocks
133 Memory blocks can be allocated by calling :c:func:`sys_mem_blocks_alloc`.
142 If ``ret == 0``, the array ``blocks`` will contain an array of memory
145 Releasing a Memory Block
148 Memory blocks are released by calling :c:func:`sys_mem_blocks_free`.
150 The following code builds on the example above which allocates 2 memory blocks,
159 ... /* perform some operations on the allocated memory blocks */
162 Using Multi Memory Blocks Allocator Group
183 To allocate and free memory blocks from the group: