Home
last modified time | relevance | path

Searched +full:blocks +full:- (Results 1 – 25 of 455) sorted by relevance

12345678910>>...19

/Zephyr-latest/doc/kernel/memory_management/
Dsys_mem_blocks.rst3 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.
14 This is useful for operations such as scatter-gather DMA transfers.
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.
[all …]
Dslabs.rst6 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.
33 The memory slab's buffer must be aligned to an N-byte boundary, where
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
48 when a memory block becomes available, it is given to the highest-priority
[all …]
/Zephyr-latest/lib/mem_blocks/
DKconfig3 # SPDX-License-Identifier: Apache-2.0
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.
14 This is useful for operations such as scatter-gather DMA
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
[all …]
/Zephyr-latest/include/zephyr/sys/
Dmem_blocks.h4 * SPDX-License-Identifier: Apache-2.0
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
63 * This is a user-provided functions whose responsibility is selecting
64 * a specific memory blocks allocator based on the opaque cfg value,
[all …]
/Zephyr-latest/tests/lib/mem_blocks/src/
Dmain.c4 * SPDX-License-Identifier: Apache-2.0
26 static ZTEST_DMEM volatile int expected_reason = -1;
30 printk("Caught system error -- reason %d\n", reason); in k_sys_fatal_error_handler()
32 if (expected_reason == -1) { in k_sys_fatal_error_handler()
43 expected_reason = -1; in k_sys_fatal_error_handler()
50 uintptr_t num = POINTER_TO_UINT(cfg) - 1; in choice_fn()
52 if (num >= group->num_allocators) { in choice_fn()
55 return group->allocators[num]; in choice_fn()
63 start = mem_block->buffer; in check_buffer_bound()
64 end = start + (BIT(mem_block->info.blk_sz_shift) * in check_buffer_bound()
[all …]
/Zephyr-latest/tests/kernel/mem_slab/mslab_api/src/
Dtest_mslab_api.c4 * SPDX-License-Identifier: Apache-2.0
34 * memory blocks that are @a slab_block_size bytes long. in tmslab_alloc_free()
85 /* TESTPOINT: -ENOMEM Returned without waiting.*/ in tmslab_alloc_timeout()
86 zassert_equal(k_mem_slab_alloc(pslab, &block_fail, K_NO_WAIT), -ENOMEM, in tmslab_alloc_timeout()
91 /* TESTPOINT: -EAGAIN Waiting period timed out*/ in tmslab_alloc_timeout()
92 zassert_equal(err, -EAGAIN); in tmslab_alloc_timeout()
100 zassert_equal(err, -ENOMEM); in tmslab_alloc_timeout()
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()
122 zassert_equal(k_mem_slab_num_free_get(pslab), BLK_NUM - 1 - i); in tmslab_used_get()
[all …]
/Zephyr-latest/dts/bindings/mtd/
Datmel,sam-flash.yaml2 # SPDX-License-Identifier: Apache-2.0
7 The Atmel SAM flash area varies in write-block-size, memory area,
8 and the layout of erase-blocks.
12 |--------------------|
14 |--------------------|
16 |--------------------|
18 |--------------------|
20 |--------------------|
24 (1024 * 1024 bytes) with a write-block-size of 8 bytes. The first
25 16 Kbytes can be erased in blocks of 2048 bytes
[all …]
/Zephyr-latest/tests/kernel/mem_slab/mslab/src/
Dmain.c2 * Copyright (c) 2012-2014 Wind River Systems, Inc.
4 * SPDX-License-Identifier: Apache-2.0
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()
84 TC_PRINT("(4) - Free a block in <%s> to unblock the other task " 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
[all …]
/Zephyr-latest/dts/bindings/ipc/
Dzephyr,ipc-icbmsg.yaml4 # SPDX-License-Identifier: Apache-2.0
7 description: Inter-core messaging backend with dynamically allocated buffers
9 compatible: "zephyr,ipc-icbmsg"
11 include: zephyr,ipc-icmsg.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/
Dipc_service_icbmsg.rst11 …ming some common problems with other backends (mostly related to multithread access and zero-copy).
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.
26 For the zero-copy case, this is done by the caller, otherwise, it is copied automatically.
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.
[all …]
/Zephyr-latest/lib/heap/
Dheap_stress.c4 * SPDX-License-Identifier: Apache-2.0
16 struct z_heap_stress_block *blocks; member
30 * Here to guarantee cross-platform test repeatability.
43 /* Edge cases: no blocks allocated, and no space for a new one */ in rand_alloc_choice()
44 if (sr->blocks_alloced == 0) { in rand_alloc_choice()
46 } else if (sr->blocks_alloced >= sr->nblocks) { in rand_alloc_choice()
65 __ASSERT(sr->total_bytes < 0xffffffffU / 100, "too big for u32!"); in rand_alloc_choice()
66 uint32_t full_pct = (100 * sr->bytes_alloced) / sr->total_bytes; in rand_alloc_choice()
67 uint32_t target = sr->target_percent ? sr->target_percent : 1; in rand_alloc_choice()
70 if (full_pct < sr->target_percent) { in rand_alloc_choice()
[all …]
/Zephyr-latest/tests/subsys/fs/ext2/src/
Dtestfs_ext_specific.c4 * SPDX-License-Identifier: Apache-2.0
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()
[all …]
/Zephyr-latest/tests/lib/multi_heap/src/
Dtest_mheap_api.c4 * SPDX-License-Identifier: Apache-2.0
45 k_current_get()->resource_pool = NULL; in thread_entry()
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.
221 "%p not %u-byte-aligned", in ZTEST()
228 zassert_not_equal(NULL, r, "16-byte-aligned alloc failed"); in ZTEST()
231 "%p not 16-byte-aligned", r); in ZTEST()
[all …]
/Zephyr-latest/tests/lib/mem_blocks_stats/src/
Dmain.c4 * SPDX-License-Identifier: Apache-2.0
25 * Verify that sys_mem_blocks_runtime_stats_get() returns -EINVAL in ZTEST()
30 zassert_equal(status, -EINVAL, "Routine returned %d instead of %d", in ZTEST()
31 status, -EINVAL); in ZTEST()
34 zassert_equal(status, -EINVAL, "Routine returned %d instead of %d", in ZTEST()
35 status, -EINVAL); in ZTEST()
38 * Verify that sys_mem_blocks_runtime_stats_reset_max() returns -EINVAL in ZTEST()
43 zassert_equal(status, -EINVAL, "Routine returned %d instead of %d", in ZTEST()
44 status, -EINVAL); in ZTEST()
51 void *blocks[3]; in ZTEST() local
[all …]
/Zephyr-latest/samples/subsys/ipc/ipc_service/multi_endpoint/boards/
Dnrf5340dk_nrf5340_cpuapp_icbmsg.overlay4 * SPDX-License-Identifier: Apache-2.0
9 /delete-property/ zephyr,ipc_shm;
12 reserved-memory {
13 /delete-node/ memory@20070000;
33 /delete-node/ ipc0;
36 compatible = "zephyr,ipc-icbmsg";
37 tx-region = <&sram_ipc0_tx>;
38 rx-region = <&sram_ipc0_rx>;
39 tx-blocks = <16>;
40 rx-blocks = <24>;
[all …]
/Zephyr-latest/samples/subsys/ipc/ipc_service/multi_endpoint/remote/boards/
Dnrf5340dk_nrf5340_cpunet_icbmsg.overlay4 * SPDX-License-Identifier: Apache-2.0
9 /delete-property/ zephyr,ipc_shm;
12 reserved-memory {
13 /delete-node/ memory@20070000;
33 /delete-node/ ipc0;
36 compatible = "zephyr,ipc-icbmsg";
37 tx-region = <&sram_ipc0_tx>;
38 rx-region = <&sram_ipc0_rx>;
39 tx-blocks = <24>;
40 rx-blocks = <16>;
[all …]
/Zephyr-latest/tests/kernel/mem_slab/mslab/
DREADME.txt7 --------------------------------------------------------------------------------
16 --------------------------------------------------------------------------------
20 Problems caused by out-dated project information can be addressed by
27 # and restore pre-defined configuration info
29 --------------------------------------------------------------------------------
33 starting test - Test Kernel memory slabs
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
[all …]
/Zephyr-latest/include/zephyr/sd/
Dmmc.h4 * SPDX-License-Identifier: Apache-2.0
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
33 * @retval -EBUSY: card is busy with another request
34 * @retval -ETIMEDOUT: card write timed out
35 * @retval -EIO: I/O error
43 * Reads blocks into MMC buffer from MMC card. For best performance, this buffer
48 * @param num_blocks number of blocks to read
50 * @retval -EBUSY: card is busy with another request
[all …]
Dsdmmc.h4 * SPDX-License-Identifier: Apache-2.0
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
33 * @retval -EBUSY: card is busy with another request
34 * @retval -ETIMEDOUT: card write timed out
35 * @retval -EIO: I/O error
43 * Reads blocks into SD buffer from SD card. For best performance, this buffer
48 * @param num_blocks number of blocks to read
50 * @retval -EBUSY: card is busy with another request
[all …]
Dsdio.h4 * SPDX-License-Identifier: Apache-2.0
33 * @retval -EIO: I/O error
45 * @retval -ETIMEDOUT: card I/O timed out
46 * @retval -EIO: I/O error
58 * @retval -EINVAL: unsupported/invalid block size
59 * @retval -EIO: I/O error
71 * @retval -EBUSY: card is busy with another request
72 * @retval -ETIMEDOUT: card read timed out
73 * @retval -EIO: I/O error
85 * @retval -EBUSY: card is busy with another request
[all …]
/Zephyr-latest/tests/drivers/i2s/i2s_speed/boards/
Dmimxrt1170_evk_mimxrt1176_cm7.conf4 # SPDX-License-Identifier: Apache-2.0
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/subsys/fs/ext2/
DKconfig2 # SPDX-License-Identifier: Apache-2.0
13 module-str = Ext2
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/
DKconfig.kinetis2 # SPDX-License-Identifier: Apache-2.0
13 int "Number or blocks in event slab"
18 Number of blocks in slab for internal endpoint events.
/Zephyr-latest/drivers/i2s/
DKconfig.esp323 # SPDX-License-Identifier: Apache-2.0
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/
DKconfig2 # SPDX-License-Identifier: Apache-2.0
7 int "Initial count of audio data blocks"
10 Controls the initial count of audio data blocks, which are (optionally)

12345678910>>...19