/Zephyr-latest/subsys/bluetooth/controller/util/ |
D | mem.c | 45 void *mem; in mem_acquire() local 52 mem = *mem_head; in mem_acquire() 53 memcpy(&head, mem, sizeof(head)); in mem_acquire() 62 return mem; in mem_acquire() 68 void mem_release(void *mem, void **mem_head) in mem_release() argument 79 memcpy(mem, mem_head, sizeof(mem)); in mem_release() 82 *((uint16_t *)MROUND((uint8_t *)mem + sizeof(mem))) = free_count; in mem_release() 84 *mem_head = mem; in mem_release() 105 uint16_t mem_index_get(const void *mem, const void *mem_pool, uint16_t mem_size) in mem_index_get() argument 107 return ((uint8_t *)mem - (uint8_t *)mem_pool) / mem_size; in mem_index_get() [all …]
|
D | memq.c | 92 memq_link_t *memq_enqueue(memq_link_t *link, void *mem, memq_link_t **tail) in memq_enqueue() argument 98 (*tail)->mem = mem; in memq_enqueue() 117 memq_link_t *memq_peek(memq_link_t *head, memq_link_t *tail, void **mem) in memq_peek() argument 125 if (mem) { in memq_peek() 126 *mem = head->mem; in memq_peek() 142 void **mem) in memq_peek_n() argument 147 head = memq_peek(head, tail, mem); in memq_peek_n() 168 memq_link_t *memq_dequeue(memq_link_t *tail, memq_link_t **head, void **mem) in memq_dequeue() argument 173 old_head = memq_peek(*head, tail, mem); in memq_dequeue()
|
D | memq.h | 14 void *mem; /* payload */ member 32 memq_link_t *memq_enqueue(memq_link_t *link, void *mem, memq_link_t **tail); 33 memq_link_t *memq_peek(memq_link_t *head, memq_link_t *tail, void **mem); 35 void **mem); 36 memq_link_t *memq_dequeue(memq_link_t *tail, memq_link_t **head, void **mem);
|
D | mfifo.h | 118 uint8_t idx, void *mem, uint8_t *last) in mfifo_by_idx_enqueue() argument 122 *p = mem; /* store the payload which for API 2 is only a void-ptr */ in mfifo_by_idx_enqueue() 132 #define MFIFO_BY_IDX_ENQUEUE(name, i, mem) \ argument 134 (mem), &mfifo_fifo_##name.l) 145 uint8_t last, void **mem) in mfifo_enqueue_get() argument 152 *mem = NULL; /* Signal the failure */ in mfifo_enqueue_get() 160 *mem = (void *)(fifo + last * size); /* preceding buffer */ in mfifo_enqueue_get() 173 #define MFIFO_ENQUEUE_GET(name, mem) \ argument 176 mfifo_fifo_##name.l, (mem)) 319 void *mem; in mfifo_dequeue() local [all …]
|
/Zephyr-latest/arch/riscv/core/ |
D | asm_macros.inc | 12 .macro lr, rd, mem 13 ld \rd, \mem 16 .macro sr, rs, mem 17 sd \rs, \mem 23 .macro lr, rd, mem 24 lw \rd, \mem 27 .macro sr, rs, mem 28 sw \rs, \mem 35 .macro flr, rd, mem 36 fld \rd, \mem [all …]
|
/Zephyr-latest/subsys/net/ip/ |
D | tp.c | 48 struct tp_mem *mem = k_malloc(sizeof(struct tp_mem) + size + in tp_malloc() local 49 sizeof(*mem->footer)); in tp_malloc() 51 mem->file = file; in tp_malloc() 52 mem->line = line; in tp_malloc() 53 mem->func = func; in tp_malloc() 55 mem->size = size; in tp_malloc() 57 mem->header = TP_MEM_HEADER_COOKIE; in tp_malloc() 59 mem->footer = (void *) ((uint8_t *) &mem->mem + size); in tp_malloc() 60 *mem->footer = TP_MEM_FOOTER_COOKIE; in tp_malloc() 62 sys_slist_append(&tp_mem, (sys_snode_t *) mem); in tp_malloc() [all …]
|
/Zephyr-latest/tests/bluetooth/audio/mocks/src/ |
D | mem_slab.c | 10 int k_mem_slab_alloc(struct k_mem_slab *slab, void **mem, k_timeout_t timeout) in k_mem_slab_alloc() argument 13 *mem = NULL; in k_mem_slab_alloc() 17 *mem = malloc(slab->info.block_size); in k_mem_slab_alloc() 18 zassert_not_null(*mem); in k_mem_slab_alloc() 24 void k_mem_slab_free(struct k_mem_slab *slab, void *mem) in k_mem_slab_free() argument 26 free(mem); in k_mem_slab_free()
|
/Zephyr-latest/tests/boards/intel_adsp/mm/src/ |
D | main.c | 24 uint32_t mem[1024]; member 57 vps[i].mem[0] = markers[i]; 63 sys_cache_data_flush_range(&vps[i].mem[0], PAGE_SZ); 76 zassert_equal(vps[i].mem[0], *(uint32_t *)pa[i], 78 vps[i].mem[0], *(uint32_t *)pa[i]); 95 zassert_equal(vps2[i].mem[0], *(uint32_t *)pa[i], 121 zassert_equal(vps3[i].mem[0], *(uint32_t *)pa[i], 123 vps3[i].mem[0], *(uint32_t *)pa[i]); 130 vps3[i].mem[0] = poison; 136 sys_cache_data_flush_range(&vps3[i].mem[0], PAGE_SZ); [all …]
|
/Zephyr-latest/subsys/llext/ |
D | llext_mem.c | 74 ext->mem[mem_idx] = llext_peek(ldr, ldr->sects[mem_idx].sh_offset); in llext_copy_section() 75 if (ext->mem[mem_idx]) { in llext_copy_section() 76 llext_init_mem_part(ext, mem_idx, (uintptr_t)ext->mem[mem_idx], in llext_copy_section() 86 ext->mem[mem_idx] = NULL; in llext_copy_section() 112 ext->mem[mem_idx] = llext_aligned_alloc(sect_align, sect_alloc); in llext_copy_section() 113 if (!ext->mem[mem_idx]) { in llext_copy_section() 119 llext_init_mem_part(ext, mem_idx, (uintptr_t)ext->mem[mem_idx], in llext_copy_section() 123 memset(ext->mem[mem_idx], 0, ldr->sects[mem_idx].sh_size); in llext_copy_section() 130 ret = llext_read(ldr, ext->mem[mem_idx], ldr->sects[mem_idx].sh_size); in llext_copy_section() 141 llext_free(ext->mem[mem_idx]); in llext_copy_section() [all …]
|
D | llext_handlers.c | 43 ext->mem[LLEXT_MEM_PREINIT], ext->mem_size[LLEXT_MEM_PREINIT]); in z_impl_llext_get_fn_table() 45 ext->mem[LLEXT_MEM_INIT], ext->mem_size[LLEXT_MEM_INIT]); in z_impl_llext_get_fn_table() 49 ext->mem[LLEXT_MEM_FINI], ext->mem_size[LLEXT_MEM_FINI]); in z_impl_llext_get_fn_table() 57 const char *text_start = ext->mem[LLEXT_MEM_TEXT]; in z_impl_llext_get_fn_table()
|
/Zephyr-latest/include/zephyr/sys/ |
D | heap_listener.h | 72 void *mem, size_t bytes); 91 void *mem, size_t bytes); 148 void heap_listener_notify_alloc(uintptr_t heap_id, void *mem, size_t bytes); 160 void heap_listener_notify_free(uintptr_t heap_id, void *mem, size_t bytes); 275 static inline void heap_listener_notify_alloc(uintptr_t heap_id, void *mem, size_t bytes) 278 ARG_UNUSED(mem); 282 static inline void heap_listener_notify_free(uintptr_t heap_id, void *mem, size_t bytes) 285 ARG_UNUSED(mem);
|
D | sys_heap.h | 109 void sys_heap_init(struct sys_heap *heap, void *mem, size_t bytes); 158 void sys_heap_free(struct sys_heap *heap, void *mem); 198 size_t sys_heap_usable_size(struct sys_heap *heap, void *mem);
|
/Zephyr-latest/tests/lib/heap/src/ |
D | main.c | 395 static void heap_alloc_cb(uintptr_t heap_id, void *mem, size_t bytes) in heap_alloc_cb() argument 398 listener_mem = mem; in heap_alloc_cb() 401 heap_id, mem, (uint32_t)bytes); in heap_alloc_cb() 404 static void heap_free_cb(uintptr_t heap_id, void *mem, size_t bytes) in heap_free_cb() argument 407 listener_mem = mem; in heap_free_cb() 410 heap_id, mem, (uint32_t)bytes); in heap_free_cb() 417 void *mem; in ZTEST() local 440 mem = sys_heap_alloc(&listener_heap, 32U); in ZTEST() 446 zassert_equal(listener_mem, mem, in ZTEST() 448 listener_mem, mem); in ZTEST() [all …]
|
/Zephyr-latest/include/zephyr/drivers/pcie/ |
D | controller.h | 79 bool mem, bool mem64, size_t bar_size, 98 bool mem, bool mem64, size_t align, 121 bool mem, bool mem64, uintptr_t bar_bus_addr, 243 bool mem, bool mem64, size_t bar_size, in pcie_ctrl_region_allocate() argument 249 return api->region_allocate(dev, bdf, mem, mem64, bar_size, bar_bus_addr); in pcie_ctrl_region_allocate() 268 bool mem, bool mem64, size_t align, in pcie_ctrl_region_get_allocate_base() argument 274 return api->region_get_allocate_base(dev, bdf, mem, mem64, align, bar_base_addr); in pcie_ctrl_region_get_allocate_base() 296 bool mem, bool mem64, uintptr_t bar_bus_addr, in pcie_ctrl_region_translate() argument 306 return api->region_translate(dev, bdf, mem, mem64, bar_bus_addr, bar_addr); in pcie_ctrl_region_translate()
|
/Zephyr-latest/kernel/ |
D | mempool.c | 14 void *mem; in z_heap_aligned_alloc() local 29 mem = k_heap_aligned_alloc(heap, __align, size, K_NO_WAIT); in z_heap_aligned_alloc() 30 if (mem == NULL) { in z_heap_aligned_alloc() 34 heap_ref = mem; in z_heap_aligned_alloc() 36 mem = ++heap_ref; in z_heap_aligned_alloc() 37 __ASSERT(align == 0 || ((uintptr_t)mem & (align - 1)) == 0, in z_heap_aligned_alloc() 38 "misaligned memory at %p (align = %zu)", mem, align); in z_heap_aligned_alloc() 40 return mem; in z_heap_aligned_alloc()
|
/Zephyr-latest/lib/heap/ |
D | heap.c | 159 uint8_t *mem = p, *base = (uint8_t *)chunk_buf(h); in mem_to_chunkid() local 160 return (mem - chunk_header_bytes(h) - base) / CHUNK_UNIT; in mem_to_chunkid() 163 void sys_heap_free(struct sys_heap *heap, void *mem) in sys_heap_free() argument 165 if (mem == NULL) { in sys_heap_free() 169 chunkid_t c = mem_to_chunkid(h, mem); in sys_heap_free() 176 "unexpected heap state (double-free?) for memory at %p", mem); in sys_heap_free() 185 mem); in sys_heap_free() 193 heap_listener_notify_free(HEAP_ID_FROM_POINTER(heap), mem, in sys_heap_free() 200 size_t sys_heap_usable_size(struct sys_heap *heap, void *mem) in sys_heap_usable_size() argument 203 chunkid_t c = mem_to_chunkid(h, mem); in sys_heap_usable_size() [all …]
|
D | heap_listener.c | 31 void heap_listener_notify_alloc(uintptr_t heap_id, void *mem, size_t bytes) in heap_listener_notify_alloc() argument 40 listener->alloc_cb(heap_id, mem, bytes); in heap_listener_notify_alloc() 47 void heap_listener_notify_free(uintptr_t heap_id, void *mem, size_t bytes) in heap_listener_notify_free() argument 56 listener->free_cb(heap_id, mem, bytes); in heap_listener_notify_free()
|
/Zephyr-latest/drivers/virtualization/ |
D | virt_ivshmem_shell.c | 67 uintptr_t mem; in cmd_ivshmem_shmem() local 76 size = ivshmem_get_mem(ivshmem, &mem); in cmd_ivshmem_shmem() 85 mem, size, id, vectors); in cmd_ivshmem_shmem() 95 uintptr_t mem; in cmd_ivshmem_dump() local 105 size = ivshmem_get_mem(ivshmem, &mem); in cmd_ivshmem_dump() 111 } else if ((mem + dump_pos + dump_size) > (mem + size)) { in cmd_ivshmem_dump() 114 shell_hexdump(sh, (const uint8_t *)mem+dump_pos, dump_size); in cmd_ivshmem_dump()
|
/Zephyr-latest/tests/drivers/virtualization/ivshmem/plain/src/ |
D | ivshmem.c | 15 uintptr_t mem; in ZTEST() local 25 size = ivshmem_get_mem(ivshmem, &mem); in ZTEST() 27 zassert_not_null((void *)mem, "Shared memory cannot be null"); in ZTEST() 32 area_to_rw = (uint32_t *)mem; in ZTEST()
|
/Zephyr-latest/tests/lib/multi_heap/src/ |
D | test_mheap_api.c | 182 char *mem; in ZTEST() local 185 mem = k_calloc(NMEMB, OVERFLOW_SIZE); in ZTEST() 186 zassert_is_null(mem, "calloc operation failed"); in ZTEST() 189 mem = k_calloc(NMEMB * 3, SIZE); in ZTEST() 190 zassert_is_null(mem, "calloc operation failed"); in ZTEST() 192 mem = k_calloc(NMEMB, SIZE); in ZTEST() 193 zassert_not_null(mem, "calloc operation failed"); in ZTEST() 197 zassert_equal(mem[i], 0); in ZTEST() 198 mem[i] = 1; in ZTEST() 201 k_free(mem); in ZTEST()
|
/Zephyr-latest/samples/subsys/zbus/benchmark/ |
D | benchmark_256KB.robot | 38 ${mem} Get Substring ${result.stdout} -20 39 ${mem} Strip String ${mem} 40 ${mem} Convert To Integer ${mem} 41 RETURN ${mem}
|
/Zephyr-latest/drivers/pcie/host/ |
D | pcie_ecam.c | 214 bool mem, bool mem64, size_t bar_size, in pcie_ecam_region_allocate() argument 220 if (mem && !data->regions[PCIE_REGION_MEM64].size && in pcie_ecam_region_allocate() 226 if (!mem && !data->regions[PCIE_REGION_IO].size) { in pcie_ecam_region_allocate() 237 if (mem && ((mem64 && data->regions[PCIE_REGION_MEM64].size) || in pcie_ecam_region_allocate() 241 } else if (mem) { in pcie_ecam_region_allocate() 251 bool mem, bool mem64, size_t align, in pcie_ecam_region_get_allocate_base() argument 257 if (mem && !data->regions[PCIE_REGION_MEM64].size && in pcie_ecam_region_get_allocate_base() 263 if (!mem && !data->regions[PCIE_REGION_IO].size) { in pcie_ecam_region_get_allocate_base() 274 if (mem && ((mem64 && data->regions[PCIE_REGION_MEM64].size) || in pcie_ecam_region_get_allocate_base() 278 } else if (mem) { in pcie_ecam_region_get_allocate_base() [all …]
|
/Zephyr-latest/tests/boards/espressif/cache_coex/src/ |
D | cache_coex.c | 31 static int *mem; variable 166 mem[i] = value; in fill_value() 172 int *ptr = mem; in check_psram() 205 mem = shared_multi_heap_aligned_alloc(SMH_REG_ATTR_EXTERNAL, 32, SPIRAM_ALLOC_SIZE); in psram_init() 206 if (!mem) { in psram_init() 210 if (!esp_ptr_external_ram(mem)) { in psram_init()
|
/Zephyr-latest/dts/riscv/sifive/ |
D | riscv64-fu540.dtsi | 126 reg-names = "mem"; 132 reg-names = "mem"; 138 reg-names = "mem"; 144 reg-names = "mem"; 150 reg-names = "mem"; 156 reg-names = "mem"; 162 reg-names = "mem"; 168 reg-names = "mem"; 188 reg-names = "mem"; 229 reg-names = "control", "mem";
|
/Zephyr-latest/lib/posix/options/ |
D | shm.c | 30 uint8_t *mem; member 88 if (arch_page_phys_get(shm->mem, &phys) == 0) { in shm_obj_remove() 89 k_mem_unmap(shm->mem, ROUND_UP(shm->size, _page_size)); in shm_obj_remove() 92 k_free(shm->mem); in shm_obj_remove() 137 shm->mem = virt; in shm_ftruncate() 194 if (shm->mem == NULL) { in shm_mmap() 204 *virt = shm->mem + off; in shm_mmap() 219 memcpy(&shm->mem[offset], buf, size); in shm_rw() 221 memcpy(buf, &shm->mem[offset], size); in shm_rw()
|