Home
last modified time | relevance | path

Searched refs:block (Results 1 – 25 of 1603) sorted by relevance

12345678910>>...65

/Zephyr-latest/tests/subsys/mem_mgmt/mem_attr_heap/src/
Dmain.c22 void *block, *old_block; in ZTEST() local
40 block = mem_attr_heap_alloc(DT_MEM_SW_ALLOC_CACHE, 0x100); in ZTEST()
41 zassert_not_null(block, "Failed to allocate memory"); in ZTEST()
47 region = mem_attr_heap_get_region(block); in ZTEST()
54 block = mem_attr_heap_alloc(DT_MEM_SW_ALLOC_NON_CACHE, 0x100); in ZTEST()
55 zassert_not_null(block, "Failed to allocate memory"); in ZTEST()
61 region = mem_attr_heap_get_region(block); in ZTEST()
68 block = mem_attr_heap_alloc(DT_MEM_SW_ALLOC_DMA, 0x100); in ZTEST()
69 zassert_not_null(block, "Failed to allocate memory"); in ZTEST()
75 region = mem_attr_heap_get_region(block); in ZTEST()
[all …]
/Zephyr-latest/tests/bluetooth/mesh/blob_io_flash/src/
Dmain.c23 static size_t chunk_size(const struct bt_mesh_blob_block *block, in chunk_size() argument
26 if ((chunk_idx == block->chunk_count - 1) && in chunk_size()
27 (block->size % CHUNK_SIZE)) { in chunk_size()
28 return block->size % CHUNK_SIZE; in chunk_size()
52 struct bt_mesh_blob_block block = { 0 }; in ZTEST() local
98 block.chunk_count = in ZTEST()
101 block.size = remaining > CONFIG_BT_MESH_BLOB_BLOCK_SIZE_MAX in ZTEST()
106 err = blob_flash_stream.io.block_start(&blob_flash_stream.io, &xfer, &block); in ZTEST()
112 flash_area_read(blob_flash_stream.area, block.offset, ctrl_data, block.size); in ZTEST()
113 zassert_mem_equal(ctrl_data, &test_data[block.offset], block.size, in ZTEST()
[all …]
/Zephyr-latest/tests/lib/shared_multi_heap/src/
Dmain.c137 void *block; in ZTEST() local
158 block = shared_multi_heap_alloc(SMH_REG_ATTR_CACHEABLE, 0x40); in ZTEST()
159 reg_map = get_region_map(block); in ZTEST()
168 block = shared_multi_heap_alloc(SMH_REG_ATTR_CACHEABLE, 0x80); in ZTEST()
169 reg_map = get_region_map(block); in ZTEST()
178 block = shared_multi_heap_alloc(SMH_REG_ATTR_CACHEABLE, 0x1200); in ZTEST()
179 reg_map = get_region_map(block); in ZTEST()
188 block = shared_multi_heap_alloc(SMH_REG_ATTR_NON_CACHEABLE, 0x100); in ZTEST()
189 reg_map = get_region_map(block); in ZTEST()
198 block = shared_multi_heap_alloc(SMH_REG_ATTR_NON_CACHEABLE, 0x100); in ZTEST()
[all …]
/Zephyr-latest/tests/kernel/mem_slab/mslab/
DREADME.txt50 block ptr to free p[0] = 0x00406400
51 MAP_LgBlks freed 1 block
53 block ptr to free p[1] = 0x00406000
54 MAP_LgBlks freed 2 block
73 main: start to wait for block
75 (4) - Free a block in <helper_thread> to unblock the other task from alloc timeout
77 helper_thread: About to free a memory block
78 main: k_mem_slab_alloc OK, block allocated at 0x00406000
79 main: start to wait for block
81 (5) <helper_thread> freeing the next block
[all …]
/Zephyr-latest/subsys/bluetooth/mesh/
Dblob.h72 #define BLOB_BLOCK_REPORT_STATUS_MSG_MAXLEN sizeof(((struct bt_mesh_blob_srv *)0)->block.missing)
73 #define BLOB_BLOCK_STATUS_MSG_MAXLEN (5 + sizeof(((struct bt_mesh_blob_srv *)0)->block.missing))
107 static inline void blob_chunk_missing_set_all(struct bt_mesh_blob_block *block) in blob_chunk_missing_set_all() argument
109 size_t bytes = block->chunk_count / 8; in blob_chunk_missing_set_all()
111 memset(block->missing, 0xff, bytes); in blob_chunk_missing_set_all()
112 if (block->chunk_count % 8) { in blob_chunk_missing_set_all()
113 block->missing[bytes] = BIT_MASK(block->chunk_count % 8); in blob_chunk_missing_set_all()
117 static inline void blob_chunk_missing_set_none(struct bt_mesh_blob_block *block) in blob_chunk_missing_set_none() argument
119 memset(block->missing, 0, sizeof(block->missing)); in blob_chunk_missing_set_none()
Dblob_cli.c53 struct bt_mesh_blob_block block; member
193 } while (++idx < cli->block.chunk_count); in next_missing_chunk()
203 memset(cli->block.missing, 0, sizeof(cli->block.missing)); in update_missing_chunks()
210 for (size_t idx = 0; idx < cli->block.chunk_count; idx++) { in update_missing_chunks()
211 bool missing = blob_chunk_missing_get(cli->block.missing, idx) || in update_missing_chunks()
213 blob_chunk_missing_set(cli->block.missing, idx, missing); in update_missing_chunks()
219 const struct bt_mesh_blob_block *block, in chunk_size() argument
222 if ((chunk_idx == block->chunk_count - 1) && in chunk_size()
223 (block->size % xfer->chunk_size)) { in chunk_size()
224 return block->size % xfer->chunk_size; in chunk_size()
[all …]
Dblob_io_flash.c61 const struct bt_mesh_blob_block *block) in block_start() argument
81 flash->offset + block->offset, &page); in block_start()
86 erase_size = page.size * DIV_ROUND_UP(block->size, page.size); in block_start()
88 erase_size = block->size; in block_start()
91 return flash_area_flatten(flash->area, flash->offset + block->offset, in block_start()
97 const struct bt_mesh_blob_block *block, in rd_chunk() argument
103 flash->offset + block->offset + chunk->offset, in rd_chunk()
109 const struct bt_mesh_blob_block *block, in wr_chunk() argument
116 flash->offset + block->offset + chunk->offset, in wr_chunk()
121 off_t area_offset = flash->offset + block->offset + chunk->offset; in wr_chunk()
Dblob_srv.c65 static inline uint32_t missing_chunks(const struct bt_mesh_blob_block *block) in missing_chunks() argument
70 for (i = 0; i < ARRAY_SIZE(block->missing); ++i) { in missing_chunks()
71 count += POPCOUNT(block->missing[i]); in missing_chunks()
159 return MIN(count, missing_chunks(&srv->block)); in pull_req_max()
196 for (i = 0; i < srv->block.chunk_count && count; ++i) { in block_report()
197 if (blob_chunk_missing_get(srv->block.missing, i)) { in block_report()
221 srv->block.number = 0xffff; in cancel()
222 memset(srv->block.missing, 0, sizeof(srv->block.missing)); in cancel()
366 missing = srv->block.chunk_count; in block_status_rsp()
370 missing = missing_chunks(&srv->block); in block_status_rsp()
[all …]
/Zephyr-latest/tests/kernel/mem_slab/mslab_api/src/
Dtest_mslab_api.c29 void *block[BLK_NUM]; in tmslab_alloc_free() local
31 (void)memset(block, 0, sizeof(block)); in tmslab_alloc_free()
39 zassert_true(k_mem_slab_alloc(pslab, &block[i], K_NO_WAIT) == 0, in tmslab_alloc_free()
45 zassert_not_null(block[i], NULL); in tmslab_alloc_free()
49 k_mem_slab_free(pslab, block[i]); in tmslab_alloc_free()
56 void *block[BLK_NUM]; in tmslab_alloc_align() local
59 zassert_true(k_mem_slab_alloc(pslab, &block[i], K_NO_WAIT) == 0, in tmslab_alloc_align()
65 zassert_true((uintptr_t)block[i] % BLK_ALIGN == 0U); in tmslab_alloc_align()
68 k_mem_slab_free(pslab, block[i]); in tmslab_alloc_align()
75 void *block[BLK_NUM], *block_fail; in tmslab_alloc_timeout() local
[all …]
/Zephyr-latest/drivers/dma/
Ddma_silabs_ldma.c90 struct dma_block_config *block, LDMA_Descriptor_t *desc) in dma_silabs_block_to_descriptor() argument
94 if (block->dest_scatter_count || block->source_gather_count || in dma_silabs_block_to_descriptor()
95 block->source_gather_interval || block->dest_scatter_interval || in dma_silabs_block_to_descriptor()
96 block->dest_reload_en || block->source_reload_en) { in dma_silabs_block_to_descriptor()
100 if ((block->source_gather_en || block->dest_scatter_en) && config->block_count == 1) { in dma_silabs_block_to_descriptor()
122 if (block->block_size % config->source_data_size) { in dma_silabs_block_to_descriptor()
123 xfer_count = block->block_size / config->source_data_size; in dma_silabs_block_to_descriptor()
125 xfer_count = block->block_size / config->source_data_size - 1; in dma_silabs_block_to_descriptor()
150 desc->xfer.ignoreSrec = block->flow_control_mode; in dma_silabs_block_to_descriptor()
158 if (block->source_addr_adj != DMA_ADDR_ADJ_NO_CHANGE && in dma_silabs_block_to_descriptor()
[all …]
/Zephyr-latest/tests/kernel/mem_slab/mslab_threadsafe/src/
Dtest_mslab_threadsafe.c42 void *block[BLK_NUM]; in tmslab_api() local
48 (void)memset(block, 0, sizeof(block)); in tmslab_api()
51 ret = k_mem_slab_alloc(slab, &block[i], TIMEOUT); in tmslab_api()
55 if (block[i]) { in tmslab_api()
56 k_mem_slab_free(slab, block[i]); in tmslab_api()
57 block[i] = NULL; in tmslab_api()
/Zephyr-latest/drivers/video/
Dvideo_common.c18 #define VIDEO_COMMON_FREE(block) shared_multi_heap_free(block) argument
23 #define VIDEO_COMMON_FREE(block) k_heap_free(&video_buffer_pool, block) argument
37 struct mem_block *block; in video_buffer_aligned_alloc() local
44 block = &video_block[i]; in video_buffer_aligned_alloc()
54 block->data = VIDEO_COMMON_HEAP_ALLOC(align, size, timeout); in video_buffer_aligned_alloc()
55 if (block->data == NULL) { in video_buffer_aligned_alloc()
59 vbuf->buffer = block->data; in video_buffer_aligned_alloc()
73 struct mem_block *block = NULL; in video_buffer_release() local
79 block = &video_block[i]; in video_buffer_release()
85 if (block) { in video_buffer_release()
[all …]
/Zephyr-latest/lib/heap/
Dshared_multi_heap.c25 void *block; in smh_choice() local
34 block = NULL; in smh_choice()
43 block = sys_heap_aligned_alloc(h, align, size); in smh_choice()
44 if (block != NULL) { in smh_choice()
49 return block; in smh_choice()
80 void shared_multi_heap_free(void *block) in shared_multi_heap_free() argument
82 sys_multi_heap_free(&shared_multi_heap, block); in shared_multi_heap_free()
/Zephyr-latest/lib/mem_blocks/
Dmem_blocks.c298 int sys_mem_blocks_free_contiguous(sys_mem_blocks_t *mem_block, void *block, size_t count) in sys_mem_blocks_free_contiguous() argument
316 ret = free_blocks(mem_block, block, count); in sys_mem_blocks_free_contiguous()
323 block, count << mem_block->info.blk_sz_shift); in sys_mem_blocks_free_contiguous()
463 struct sys_mem_blocks *block; in sys_mem_blocks_stats_raw() local
466 block = CONTAINER_OF(obj_core, struct sys_mem_blocks, obj_core); in sys_mem_blocks_stats_raw()
468 key = k_spin_lock(&block->lock); in sys_mem_blocks_stats_raw()
470 memcpy(stats, &block->info, sizeof(block->info)); in sys_mem_blocks_stats_raw()
472 k_spin_unlock(&block->lock, key); in sys_mem_blocks_stats_raw()
479 struct sys_mem_blocks *block; in sys_mem_blocks_stats_query() local
483 block = CONTAINER_OF(obj_core, struct sys_mem_blocks, obj_core); in sys_mem_blocks_stats_query()
[all …]
/Zephyr-latest/subsys/mem_mgmt/
Dmem_attr_heap.c29 void *block; in mah_choice() local
38 block = NULL; in mah_choice()
49 block = sys_heap_aligned_alloc(&h->heap, align, size); in mah_choice()
50 if (block != NULL) { in mah_choice()
55 return block; in mah_choice()
58 void mem_attr_heap_free(void *block) in mem_attr_heap_free() argument
60 sys_multi_heap_free(&mah_data.multi_heap, block); in mem_attr_heap_free()
/Zephyr-latest/tests/kernel/mem_slab/mslab_concept/src/
Dtest_mslab_alloc_wait.c23 void *block; in tmslab_alloc_wait_timeout() local
25 zassert_true(k_mem_slab_alloc(&mslab1, &block, TIMEOUT) == -EAGAIN, in tmslab_alloc_wait_timeout()
53 void *block[BLK_NUM]; in ZTEST() local
59 zassert_equal(k_mem_slab_alloc(&mslab1, &block[i], K_NO_WAIT), in ZTEST()
87 k_mem_slab_free(&mslab1, block[0]); in ZTEST()
99 k_mem_slab_free(&mslab1, block[i]); in ZTEST()
/Zephyr-latest/dts/arm/renesas/ra/ra8/
Dr7fa8m1ahecbd.dtsi15 write-block-size = <128>;
16 erase-block-size = <8192>;
23 write-block-size = <4>;
24 erase-block-size = <64>;
Dr7fa8t1ahecbd.dtsi15 write-block-size = <128>;
16 erase-block-size = <8192>;
23 write-block-size = <4>;
24 erase-block-size = <64>;
Dr7fa8d1bhecbd.dtsi16 write-block-size = <128>;
17 erase-block-size = <8192>;
24 write-block-size = <4>;
25 erase-block-size = <64>;
/Zephyr-latest/doc/kernel/memory_management/
Dslabs.rst24 * The **block size** of each block, measured in bytes.
31 It must be at least "block size" times "number of blocks" bytes long.
36 the block size must also be a multiple of N.
41 A thread that needs to use a memory block simply allocates it from a memory
42 slab. When the thread finishes with a memory block,
43 it must release the block back to the memory slab so the block can be reused.
48 when a memory block becomes available, it is given to the highest-priority
62 the first 4 bytes of each unused block provide the necessary linkage.
76 .. code-block:: c
89 .. code-block:: c
[all …]
/Zephyr-latest/doc/connectivity/networking/api/
Dzperf.rst20 .. code-block:: console
33 .. code-block:: console
39 .. code-block:: console
46 .. code-block:: console
53 .. code-block:: console
61 .. code-block:: console
68 .. code-block:: console
75 .. code-block:: console
82 .. code-block:: console
90 .. code-block:: console
[all …]
/Zephyr-latest/tests/lib/multi_heap/src/
Dtest_mheap_concept.c36 void *block[BLK_NUM_MAX]; in ZTEST() local
43 block[i] = k_malloc(i); in ZTEST()
44 zassert_not_null(block[i], NULL); in ZTEST()
45 zassert_false((uintptr_t)block[i] % sizeof(void *)); in ZTEST()
50 k_free(block[i]); in ZTEST()
/Zephyr-latest/doc/connectivity/bluetooth/shell/host/
Diso.rst7 .. code-block:: console
30 .. code-block:: console
37 .. code-block:: console
43 .. code-block:: console
51 .. code-block:: console
60 .. code-block:: console
/Zephyr-latest/subsys/fs/ext2/
Dext2_diskops.c25 static int get_level_offsets(struct ext2_data *fs, uint32_t block, uint32_t offsets[4]);
257 uint32_t block = group / groups_per_block; in ext2_fetch_block_group() local
259 uint32_t global_block = fs->sblock.s_first_data_block + 1 + block; in ext2_fetch_block_group()
293 int ext2_fetch_bg_itable(struct ext2_bgroup *bg, uint32_t block) in ext2_fetch_bg_itable() argument
295 if (bg->inode_table && bg->inode_table_block == block) { in ext2_fetch_bg_itable()
300 uint32_t global_block = bg->bg_inode_table + block; in ext2_fetch_bg_itable()
308 bg->inode_table_block = block; in ext2_fetch_bg_itable()
408 uint32_t block; in fetch_level_blocks() local
426 block = inode->i_block[offsets[0]]; in fetch_level_blocks()
430 block = sys_le32_to_cpu(list[offsets[lvl]]); in fetch_level_blocks()
[all …]
/Zephyr-latest/boards/intel/common/
Dnet_boot.rst10 .. code-block:: console
16 .. code-block:: console
24 .. code-block:: console
36 .. code-block:: console
43 .. code-block:: console
51 .. code-block:: console
76 .. code-block:: console
86 .. code-block:: console

12345678910>>...65