/Zephyr-latest/doc/kernel/memory_management/ |
D | sys_mem_blocks.rst | 3 Memory Blocks Allocator 6 The Memory Blocks Allocator allows memory blocks to be dynamically 9 * All memory blocks have a single fixed size. 11 * Multiple blocks can be allocated or freed at the same time. 13 * A group of blocks allocated together may not be contiguous. 16 * Bookkeeping of allocated blocks is done outside of the associated 27 Any number of Memory Blocks Allocator can be defined (limited only by 30 A memory blocks allocator has the following key properties: 35 * The **number of blocks** available for allocation. 38 * A **buffer** that provides the memory for the memory slab's blocks. [all …]
|
D | slabs.rst | 6 A :dfn:`memory slab` is a kernel object that allows memory blocks 8 All memory blocks in a memory slab have a single fixed size, 27 * The **number of blocks** available for allocation. 30 * A **buffer** that provides the memory for the memory slab's blocks. 31 It must be at least "block size" times "number of blocks" bytes long. 35 all memory blocks in the buffer are similarly aligned to this boundary, 39 its blocks as unused. 45 If all the blocks are currently in use, a thread can optionally wait 52 allows for a memory slab with smaller blocks and others with larger-sized 53 blocks. Alternatively, a memory pool object may be used. [all …]
|
/Zephyr-latest/lib/mem_blocks/ |
D | Kconfig | 5 menu "Memory Blocks" 8 bool "(Yet Another) Memory Blocks Allocator" 11 () All memory blocks have a single fixed size. 12 () Multiple blocks can be allocated or freed at the same time. 13 () A group of blocks allocated together may not be contiguous. 16 () Bookkeeping of allocated blocks is done outside of 22 bool "Memory Blocks Allocator event notifications" 26 This allows application to listen for memory blocks allocator 30 bool "Memory blocks runtime statistics" 34 blocks statistics related to the current and maximum number [all …]
|
/Zephyr-latest/include/zephyr/sys/ |
D | mem_blocks.h | 10 * @brief Memory Blocks Allocator 31 * @defgroup mem_blocks_apis Memory Blocks APIs 37 * @brief Memory Blocks Allocator 42 * @brief Multi Memory Blocks Allocator 49 * @brief Memory Blocks Allocator 56 * @brief Multi Memory Blocks Allocator 61 * @brief Multi memory blocks allocator choice function 64 * a specific memory blocks allocator based on the opaque cfg value, 72 * @param group Multi memory blocks allocator structure. 86 uint32_t num_blocks; /* Total number of blocks */ [all …]
|
/Zephyr-latest/tests/lib/mem_blocks/src/ |
D | main.c | 119 void *blocks[NUM_BLOCKS][1]; in alloc_free() local 138 ret = sys_mem_blocks_alloc(mem_block, 1, blocks[i]); in alloc_free() 142 zassert_true(check_buffer_bound(mem_block, blocks[i][0]), in alloc_free() 156 zassert_equal(listener_mem[i], blocks[i][0], in alloc_free() 158 listener_mem[i], blocks[i][0]); in alloc_free() 168 ret = sys_mem_blocks_alloc(mem_block, 1, blocks[i]); in alloc_free() 178 ret = sys_mem_blocks_free(mem_block, 1, blocks[i]); in alloc_free() 193 zassert_equal(listener_mem[i], blocks[i][0], in alloc_free() 195 listener_mem[i], blocks[i][0]); in alloc_free() 251 /* blocks 0 and 1 should be taken */ in ZTEST() [all …]
|
/Zephyr-latest/tests/kernel/mem_slab/mslab_api/src/ |
D | test_mslab_api.c | 34 * memory blocks that are @a slab_block_size bytes long. in tmslab_alloc_free() 117 /* TESTPOINT: Get the number of used blocks in a memory slab.*/ in tmslab_used_get() 120 * TESTPOINT: Get the number of unused blocks in a memory slab. in tmslab_used_get() 157 /* Get all blocks from the memory slab */ in helper_thread() 159 /* Verify number of used blocks in the map */ in helper_thread() 176 /* Free all the other blocks. The first block are freed by this task */ in helper_thread() 188 * and allocates/frees blocks. 190 * @details Initialize 3 memory blocks of block size 8 bytes 191 * using @see k_mem_slab_init() and check if number of used blocks 192 * is 0 and free blocks is equal to number of blocks initialized. [all …]
|
/Zephyr-latest/tests/kernel/mem_slab/mslab/src/ |
D | main.c | 34 /* Number of memory blocks. The minimum number of blocks needed to run the 53 * This routine gets all blocks from the memory slab. It uses semaphores 69 TC_PRINT("(2) - Allocate %d blocks in <%s>\n", NUMBLOCKS, __func__); in helper_thread() 98 * Free all the other blocks. The first 2 blocks are freed by this task in helper_thread() 103 TC_PRINT("%s: freed all blocks allocated by this task\n", __func__); in helper_thread() 113 * @brief Get all blocks from the memory slab 115 * Get all blocks from the memory slab. It also tries to get one more block 122 * @param p pointer to pointer of allocated blocks 131 /* Verify number of used blocks in the map */ in test_slab_get_all_blocks() 141 * Verify number of used blocks in the map - expect all blocks are in test_slab_get_all_blocks() [all …]
|
/Zephyr-latest/dts/bindings/mtd/ |
D | atmel,sam-flash.yaml | 8 and the layout of erase-blocks. 25 16 Kbytes can be erased in blocks of 2048 bytes 26 (8 blocks of 2048 bytes), the remaining flash area is erasable 27 in blocks of 4096 bytes (252 blocks of 4096 bytes). 48 erase-blocks = <&eefc 8 2048>, <&eefc 252 4096>; 99 The flash controller is limited by hardware to writing blocks of 107 blocks of flash at a time. This property describes the largest 108 erase block size in erase-blocks. 110 erase-blocks: 115 blocks of flash at a time. This property describes the layout of [all …]
|
/Zephyr-latest/dts/bindings/ipc/ |
D | zephyr,ipc-icbmsg.yaml | 14 tx-blocks: 15 description: number of allocable TX blocks 19 rx-blocks: 20 description: number of allocable RX blocks
|
/Zephyr-latest/doc/services/ipc/ipc_service/backends/ |
D | ipc_service_icbmsg.rst | 18 One is reserved for the ICMsg and the other contains equal-sized blocks. 19 The number of blocks is configured in the devicetree. 23 * The sender allocates one or more blocks. 24 …If there are not enough sequential blocks, it waits using the timeout provided in the parameter th… 25 * The allocated blocks are filled with data. 27 …During this time other threads are not blocked in any way as long as there are enough free blocks … 30 …The size of the ICMsg queue is large enough to hold messages for all blocks, so it will never over… 32 Again, other threads are not blocked as long as there are enough free blocks for them. 34 * When the backend receives this message, it deallocates all blocks. 48 * Define the number of allocable blocks for each region with ``tx-blocks`` and ``rx-blocks``. [all …]
|
/Zephyr-latest/lib/heap/ |
D | heap_stress.c | 16 struct z_heap_stress_block *blocks; member 43 /* Edge cases: no blocks allocated, and no space for a new one */ in rand_alloc_choice() 79 * smaller blocks (i.e. blocks twice as large are half as frequent 120 .blocks = scratch_mem, in sys_heap_stress() 135 sr.blocks[sr.blocks_alloced].ptr = p; in sys_heap_stress() 136 sr.blocks[sr.blocks_alloced].sz = sz; in sys_heap_stress() 142 void *p = sr.blocks[b].ptr; in sys_heap_stress() 143 size_t sz = sr.blocks[b].sz; in sys_heap_stress() 146 sr.blocks[b] = sr.blocks[sr.blocks_alloced - 1]; in sys_heap_stress()
|
/Zephyr-latest/tests/subsys/fs/ext2/src/ |
D | testfs_ext_specific.c | 15 uint32_t blocks = 0; in calculate_blocks() local 21 blocks += 12; in calculate_blocks() 22 freeb -= 12 + 1; /* direct blocks + top block of first level table */ in calculate_blocks() 25 return blocks + freeb; in calculate_blocks() 28 blocks += B; in calculate_blocks() 29 freeb -= B + 1; /* 1st level blocks + top block of second level table */ in calculate_blocks() 36 return blocks + n * B + r - partial; in calculate_blocks() 38 return blocks; in calculate_blocks() 39 /* TODO: revisit this and extend when 3rd level blocks will be possible */ in calculate_blocks() 120 zassert_equal(ret, 0, "Failed to mkfs with 2K blocks"); in writing_test() [all …]
|
/Zephyr-latest/tests/lib/multi_heap/src/ |
D | test_mheap_api.c | 60 * @details The test allocates 4 blocks from heap memory pool 63 * validates k_free() API by freeing up all the blocks which were 172 * the API will return NULL. The 8 blocks of memory of 175 * blocks are memset to 0 and read/write is allowed. The test is then 176 * teared up by freeing all the blocks allocated. 319 char *blocks[N_MULTI_HEAPS]; in ZTEST() local 331 blocks[i] = sys_multi_heap_alloc(&multi_heap, (void *)(long)i, in ZTEST() 334 zassert_not_null(blocks[i], "allocation failed"); in ZTEST() 335 zassert_true(blocks[i] >= &heap_mem[i][0] && in ZTEST() 336 blocks[i] < &heap_mem[i+1][0], in ZTEST() [all …]
|
/Zephyr-latest/tests/lib/mem_blocks_stats/src/ |
D | main.c | 51 void *blocks[3]; in ZTEST() local 68 /* Allocate three blocks, and then verify the stats. */ in ZTEST() 70 status = sys_mem_blocks_alloc(&mem_block_01, 3, blocks); in ZTEST() 71 zassert_equal(status, 0, "Routine failed to allocate 3 blocks (%d)\n", in ZTEST() 86 /* Free blocks 1 and 2, and then verify the stats. */ in ZTEST() 88 status = sys_mem_blocks_free(&mem_block_01, 2, &blocks[1]); in ZTEST() 106 status = sys_mem_blocks_alloc(&mem_block_01, 1, &blocks[1]); in ZTEST() 123 /* Reset the max allocated blocks; verify max is 2 blocks */ in ZTEST() 141 /* Free the last two blocks; verify stats results */ in ZTEST() 143 status = sys_mem_blocks_free(&mem_block_01, 2, &blocks[0]); in ZTEST()
|
/Zephyr-latest/samples/subsys/ipc/ipc_service/multi_endpoint/boards/ |
D | nrf5340dk_nrf5340_cpuapp_icbmsg.overlay | 39 tx-blocks = <16>; 40 rx-blocks = <24>; 55 tx-blocks = <32>; 56 rx-blocks = <48>;
|
/Zephyr-latest/samples/subsys/ipc/ipc_service/multi_endpoint/remote/boards/ |
D | nrf5340dk_nrf5340_cpunet_icbmsg.overlay | 39 tx-blocks = <24>; 40 rx-blocks = <16>; 50 tx-blocks = <48>; 51 rx-blocks = <32>;
|
/Zephyr-latest/tests/kernel/mem_slab/mslab/ |
D | README.txt | 36 (1) - Allocate and free 2 blocks in <main> 39 MAP_LgBlks used 0 blocks 41 MAP_LgBlks used 1 blocks 43 MAP_LgBlks used 2 blocks 44 k_mem_slab_alloc RC_FAIL expected as all (2) blocks are used. 49 MAP_LgBlks used 2 blocks 52 MAP_LgBlks used 1 blocks 55 MAP_LgBlks used 0 blocks 59 (2) - Allocate 2 blocks in <helper_thread> 62 MAP_LgBlks used 0 blocks [all …]
|
/Zephyr-latest/tests/drivers/i2s/i2s_speed/boards/ |
D | mimxrt1170_evk_mimxrt1176_cm7.conf | 11 # CONFIG_DMA_TCD_QUEUE_SIZE sets size of queue used to chain DMA blocks (TCDs) 13 # enough, the DMA may starve. Symptoms of this issue include transmit blocks 14 # repeated, or RX blocks skipped. For I2S driver, queue size must be at least 3.
|
/Zephyr-latest/include/zephyr/sd/ |
D | mmc.h | 24 * @brief Write blocks to MMC card from buffer 26 * Writes blocks from MMC buffer to MMC card. For best performance, this buffer 31 * @param num_blocks number of blocks to write 43 * Reads blocks into MMC buffer from MMC card. For best performance, this buffer 48 * @param num_blocks number of blocks to read
|
D | sdmmc.h | 24 * @brief Write blocks to SD card from buffer 26 * Writes blocks from SD buffer to SD card. For best performance, this buffer 31 * @param num_blocks number of blocks to write 43 * Reads blocks into SD buffer from SD card. For best performance, this buffer 48 * @param num_blocks number of blocks to read
|
D | sdio.h | 142 * @brief Read blocks from SDIO fifo 144 * Reads blocks from SDIO register, treating it as a fifo. Reads will 149 * @param blocks: number of blocks to read from fifo 156 uint32_t blocks); 159 * @brief Write blocks to SDIO fifo 161 * Writes blocks from SDIO register, treating it as a fifo. Writes will 166 * @param blocks: number of blocks to write to fifo 173 uint32_t blocks);
|
/Zephyr-latest/subsys/fs/ext2/ |
D | Kconfig | 31 are used to store fetched blocks. 34 int "Maximum number of blocks that might be used" 38 are used to store fetched blocks.
|
/Zephyr-latest/drivers/usb/udc/ |
D | Kconfig.kinetis | 13 int "Number or blocks in event slab" 18 Number of blocks in slab for internal endpoint events.
|
/Zephyr-latest/drivers/i2s/ |
D | Kconfig.esp32 | 20 Max number of blocks waiting to be read from the I2S RX channel. 26 Max number of blocks waiting to be transmitted by the I2S TX channel.
|
/Zephyr-latest/samples/drivers/i2s/i2s_codec/ |
D | Kconfig | 7 int "Initial count of audio data blocks" 10 Controls the initial count of audio data blocks, which are (optionally)
|