/external/adhd/cras/src/common/ |
D | cras_shm.h | 158 void cras_audio_shm_destroy(struct cras_audio_shm *shm); 162 cras_shm_get_checked_buffer_offset(const struct cras_audio_shm *shm, in cras_shm_get_checked_buffer_offset() argument 165 unsigned buffer_offset = shm->header->buffer_offset[buf_idx]; in cras_shm_get_checked_buffer_offset() 168 return MIN(buffer_offset, shm->samples_info.length); in cras_shm_get_checked_buffer_offset() 172 static inline uint8_t *cras_shm_buff_for_idx(const struct cras_audio_shm *shm, in cras_shm_buff_for_idx() argument 178 return shm->samples + cras_shm_get_checked_buffer_offset(shm, idx); in cras_shm_buff_for_idx() 183 cras_shm_get_checked_read_offset(const struct cras_audio_shm *shm, in cras_shm_get_checked_read_offset() argument 187 cras_shm_get_checked_buffer_offset(shm, buf_idx); in cras_shm_get_checked_read_offset() 188 unsigned read_offset = shm->header->read_offset[buf_idx]; in cras_shm_get_checked_read_offset() 193 if (read_offset > shm->config.used_size) in cras_shm_get_checked_read_offset() [all …]
|
D | cras_shm.c | 94 struct cras_audio_shm *shm; in cras_audio_shm_create() local 109 shm = calloc(1, sizeof(*shm)); in cras_audio_shm_create() 110 if (!shm) { in cras_audio_shm_create() 123 ret = cras_shm_info_move(header_info, &shm->header_info); in cras_audio_shm_create() 126 header_info = &shm->header_info; in cras_audio_shm_create() 128 ret = cras_shm_info_move(samples_info, &shm->samples_info); in cras_audio_shm_create() 131 samples_info = &shm->samples_info; in cras_audio_shm_create() 133 shm->header = mmap(NULL, header_info->length, PROT_READ | PROT_WRITE, in cras_audio_shm_create() 135 if (shm->header == (struct cras_audio_shm_header *)-1) { in cras_audio_shm_create() 141 shm->samples = mmap(NULL, samples_info->length, samples_prot, in cras_audio_shm_create() [all …]
|
/external/u-boot/drivers/tee/ |
D | tee-uclass.c | 52 struct tee_shm *shm; in __tee_shm_add() local 65 shm = calloc(1, sizeof(*shm)); in __tee_shm_add() 66 if (!shm) { in __tee_shm_add() 71 shm->dev = dev; in __tee_shm_add() 72 shm->addr = p; in __tee_shm_add() 73 shm->size = size; in __tee_shm_add() 74 shm->flags = flags; in __tee_shm_add() 77 rc = tee_get_ops(dev)->shm_register(dev, shm); in __tee_shm_add() 85 list_add(&shm->link, &priv->list_shm); in __tee_shm_add() 88 *shmp = shm; in __tee_shm_add() [all …]
|
/external/perfetto/src/tracing/ipc/ |
D | posix_shared_memory_unittest.cc | 45 std::unique_ptr<SharedMemory> shm = in TEST() local 47 ASSERT_NE(shm.get(), nullptr); in TEST() 48 void* const shm_start = shm->start(); in TEST() 49 const size_t shm_size = shm->size(); in TEST() 56 shm.reset(); in TEST() 61 std::unique_ptr<PosixSharedMemory> shm = in TEST() local 63 ASSERT_NE(shm.get(), nullptr); in TEST() 64 int fd = shm->fd(); in TEST() 68 shm.reset(); in TEST() 78 std::unique_ptr<PosixSharedMemory> shm = PosixSharedMemory::AttachToFd( in TEST() local [all …]
|
/external/adhd/cras/src/tests/ |
D | cras_client_unittest.cc | 48 struct cras_audio_shm* shm = in InitShm() local 49 static_cast<struct cras_audio_shm*>(calloc(1, sizeof(*shm))); in InitShm() 50 shm->header = in InitShm() 51 static_cast<cras_audio_shm_header*>(calloc(1, sizeof(*shm->header))); in InitShm() 52 cras_shm_set_frame_bytes(shm, 4); in InitShm() 54 cras_shm_set_used_size(shm, used_size); in InitShm() 55 shm->samples_info.length = used_size * 2; in InitShm() 56 memcpy(&shm->header->config, &shm->config, sizeof(shm->config)); in InitShm() 57 return shm; in InitShm() 82 if (stream_.shm) { in TearDown() [all …]
|
D | dev_io_stubs.cc | 27 ShmPtr shm(reinterpret_cast<struct cras_audio_shm*>( in create_shm() 31 shm->header = reinterpret_cast<struct cras_audio_shm_header*>( in create_shm() 33 shm->header->config.used_size = used_size; in create_shm() 34 shm->header->config.frame_bytes = frame_bytes; in create_shm() 35 shm->config = shm->header->config; in create_shm() 38 shm->samples = reinterpret_cast<uint8_t*>(calloc(1, samples_size)); in create_shm() 39 shm->samples_info.length = samples_size; in create_shm() 40 return shm; in create_shm() 43 void destroy_shm(struct cras_audio_shm* shm) { in destroy_shm() argument 44 free(shm->header); in destroy_shm() [all …]
|
D | audio_thread_unittest_obsolete.cc | 131 struct cras_audio_shm* shm; in SetupRstream() local 140 shm = cras_rstream_input_shm(*rstream); in SetupRstream() 141 shm->header = (struct cras_audio_shm_header*)calloc( in SetupRstream() 142 1, sizeof(*shm->header) + cb_threshold_ * 8); in SetupRstream() 143 cras_shm_set_frame_bytes(shm, 4); in SetupRstream() 144 cras_shm_set_used_size(shm, cb_threshold_ * cras_shm_frame_bytes(shm)); in SetupRstream() 548 struct cras_audio_shm* shm; in SetupRstream() local 557 shm = cras_rstream_output_shm(*rstream); in SetupRstream() 558 shm->header = (struct cras_audio_shm_header*)calloc( in SetupRstream() 559 1, sizeof(*shm->header) + cb_threshold_ * 8); in SetupRstream() [all …]
|
D | dev_io_stubs.h | 32 void destroy_shm(struct cras_audio_shm* shm); 38 Stream(ShmPtr shm, RstreamPtr rstream, DevStreamPtr dstream) in Stream() 39 : shm(std::move(shm)), in Stream() 42 ShmPtr shm; member 62 cras_audio_shm* shm);
|
D | dev_stream_unittest.cc | 124 SetupShm(&rstream_.shm); in SetUp() 177 int16_t* shm_samples = (int16_t*)rstream_.shm->samples; in SetUp() 187 free(rstream_.shm->header); in TearDown() 188 free(rstream_.shm->samples); in TearDown() 189 free(rstream_.shm); in TearDown() 196 struct cras_audio_shm* shm; in SetupShm() local 199 shm = static_cast<struct cras_audio_shm*>( in SetupShm() 202 shm->header = static_cast<struct cras_audio_shm_header*>( in SetupShm() 204 cras_shm_set_frame_bytes(shm, 4); in SetupShm() 205 used_size = kBufferFrames * cras_shm_frame_bytes(shm); in SetupShm() [all …]
|
/external/crosvm/sys_util/src/ |
D | shm.rs | 276 let shm = SharedMemory::new(None).expect("failed to create shared memory"); in new() localVariable 277 assert_eq!(shm.size(), 0); in new() 285 let mut shm = SharedMemory::new(None).expect("failed to create shared memory"); in new_sized() localVariable 286 shm.set_size(1024) in new_sized() 288 assert_eq!(shm.size(), 1024); in new_sized() 296 let mut shm = SharedMemory::new(None).expect("failed to create shared memory"); in new_huge() localVariable 297 shm.set_size(0x7fff_ffff_ffff_ffff) in new_huge() 299 assert_eq!(shm.size(), 0x7fff_ffff_ffff_ffff); in new_huge() 307 let mut shm = SharedMemory::new(None).expect("failed to create shared memory"); in new_too_huge() localVariable 308 shm.set_size(0x8000_0000_0000_0000).unwrap_err(); in new_too_huge() [all …]
|
/external/ltp/testcases/cve/ |
D | cve-2017-17053.c | 65 static struct shm_data *shm; variable 71 shm->segfaulted = 1; in handler() 72 shm->do_exit = 1; in handler() 90 shm = SAFE_MMAP(NULL, sizeof(struct shm_data), in setup() 97 SAFE_MUNMAP(shm, sizeof(struct shm_data)); in cleanup() 114 if (shm->do_exit) in run_test() 133 shm->do_exit = 0; in run() 134 shm->segfaulted = 0; in run() 141 shm->do_exit = 1; in run() 146 if (WIFEXITED(status) && shm->segfaulted == 0 && tst_taint_check() == 0) in run()
|
/external/u-boot/drivers/tee/optee/ |
D | core.c | 188 mp->u.rmem.shm_ref = (ulong)p->u.memref.shm; in to_msg_param() 203 struct tee_shm *shm; in from_msg_param() local 230 shm = (struct tee_shm *)(ulong)mp->u.rmem.shm_ref; in from_msg_param() 232 if (!shm) { in from_msg_param() 234 p->u.memref.shm = NULL; in from_msg_param() 238 p->u.memref.shm = shm; in from_msg_param() 250 struct tee_shm *shm; in handle_rpc() local 256 &shm)) { in handle_rpc() 258 virt_to_phys(shm->addr)); in handle_rpc() 260 reg_pair_from_64(¶m->a4, ¶m->a5, (ulong)shm); in handle_rpc() [all …]
|
D | supplicant.c | 20 struct tee_shm *shm; in cmd_shm_alloc() local 33 TEE_SHM_REGISTER | TEE_SHM_ALLOC, &shm); in cmd_shm_alloc() 42 pl = optee_alloc_and_init_page_list(shm->addr, shm->size, &ph_ptr); in cmd_shm_alloc() 45 tee_shm_free(shm); in cmd_shm_alloc() 53 arg->params[0].u.tmem.size = shm->size; in cmd_shm_alloc() 54 arg->params[0].u.tmem.shm_ref = (ulong)shm; in cmd_shm_alloc()
|
/external/adhd/cras/src/server/ |
D | dev_stream.c | 269 struct cras_audio_shm *shm; in capture_copy_converted_to_stream() local 279 shm = cras_rstream_shm(rstream); in capture_copy_converted_to_stream() 287 shm, cras_rstream_get_cb_threshold(rstream), in capture_copy_converted_to_stream() 292 ATLOG(atlog, AUDIO_THREAD_CONV_COPY, shm->header->write_buf_idx, in capture_copy_converted_to_stream() 322 total_written, cras_shm_frames_written(shm)); in capture_copy_converted_to_stream() 332 struct cras_audio_shm *shm; in dev_stream_capture() local 357 shm = cras_rstream_shm(rstream); in dev_stream_capture() 359 shm, cras_rstream_get_cb_threshold(rstream), in dev_stream_capture() 369 nread, cras_shm_frames_written(shm)); in dev_stream_capture() 417 struct cras_audio_shm *shm; in dev_stream_capture_avail() local [all …]
|
D | cras_rstream.c | 85 if (stream->shm) { in setup_shm_area() 126 &stream->shm); in setup_shm_area() 130 cras_shm_set_frame_bytes(stream->shm, frame_bytes); in setup_shm_area() 131 cras_shm_set_used_size(stream->shm, used_size); in setup_shm_area() 201 cras_shm_set_callback_pending(stream->shm, 1); in set_pending_reply() 209 cras_shm_set_callback_pending(stream->shm, 0); in clear_pending_reply() 304 stream->shm = NULL; in cras_rstream_create() 343 cras_audio_shm_destroy(stream->shm); in cras_rstream_destroy() 420 cras_shm_buffer_write_complete(stream->shm); in cras_rstream_audio_ready() 424 cras_shm_buffer_read_current(stream->shm, count); in cras_rstream_audio_ready() [all …]
|
D | cras_rstream.h | 75 struct cras_audio_shm *shm; member 275 *header_fd = stream->shm->header_info.fd; in cras_rstream_get_shm_fds() 276 *samples_fd = stream->shm->samples_info.fd; in cras_rstream_get_shm_fds() 285 return cras_shm_samples_size(stream->shm); in cras_rstream_get_samples_shm_size() 292 return stream->shm; in cras_rstream_shm() 349 const struct cras_audio_shm *shm = cras_rstream_shm(rstream); in cras_rstream_level() local 350 return cras_shm_frames_written(shm); in cras_rstream_level() 355 const struct cras_audio_shm *shm = cras_rstream_shm(rstream); in cras_rstream_input_level_met() local 356 return cras_shm_frames_written(shm) >= rstream->cb_threshold; in cras_rstream_input_level_met()
|
/external/python/cpython3/Lib/multiprocessing/ |
D | shared_memory.py | 314 self.shm = SharedMemory(name) 316 self.shm = SharedMemory(name, create=True, size=requested_size) 322 self.shm.buf, 329 self.shm.buf, 335 self.shm.buf, 341 self.shm.buf, 350 self.shm.buf, 362 self.shm.buf, 379 self.shm.buf, 396 self.shm.buf, [all …]
|
/external/skqp/infra/pathkit/docker/ |
D | README.md | 42 Of note, some versions (generally before Chrome 60) run out of space on /dev/shm when 44 with the flag --shm-size=2gb. 50 docker run -it --shm-size=2gb karma-chrome-tests /bin/bash 52 …docker run --shm-size=2gb -v $SKIA_ROOT:/SRC karma-chrome-tests karma start /SRC/infra/pathkit/kar… 69 Of note, some versions (generally before Chrome 60) run out of space on /dev/shm when 71 with the flag --shm-size=2gb. 78 docker run -it --shm-size=2gb gold-karma-chrome-tests /bin/bash 81 …docker run --shm-size=2gb -v $SKIA_ROOT:/SRC -v /tmp/dockergold:/OUT gold-karma-chrome-tests /SRC/… 98 Of note, some versions (generally before Chrome 60) run out of space on /dev/shm when 100 with the flag --shm-size=2gb. [all …]
|
/external/skia/infra/wasm-common/docker/ |
D | README.md | 42 Of note, some versions (generally before Chrome 60) run out of space on /dev/shm when 44 with the flag --shm-size=2gb. 50 docker run -it --shm-size=2gb karma-chrome-tests /bin/bash 52 …docker run --shm-size=2gb -v $SKIA_ROOT:/SRC karma-chrome-tests karma start /SRC/infra/pathkit/kar… 69 Of note, some versions (generally before Chrome 60) run out of space on /dev/shm when 71 with the flag --shm-size=2gb. 78 docker run -it --shm-size=2gb gold-karma-chrome-tests /bin/bash 81 …docker run --shm-size=2gb -v $SKIA_ROOT:/SRC -v /tmp/dockergold:/OUT gold-karma-chrome-tests /SRC/… 98 Of note, some versions (generally before Chrome 60) run out of space on /dev/shm when 100 with the flag --shm-size=2gb. [all …]
|
/external/crosvm/fuzz/ |
D | zimage_fuzzer.rs | 16 let mut shm = SharedMemory::new(None).expect("failed to create shared memory"); in make_elf_bin() localVariable 17 shm.set_size(elf_bytes.len() as u64) in make_elf_bin() 19 shm.write_all(elf_bytes) in make_elf_bin() 21 shm.into() in make_elf_bin()
|
/external/u-boot/include/ |
D | tee.h | 98 struct tee_shm *shm; member 227 int (*shm_register)(struct udevice *dev, struct tee_shm *shm); 234 int (*shm_unregister)(struct udevice *dev, struct tee_shm *shm); 284 void tee_shm_free(struct tee_shm *shm); 294 bool tee_shm_is_registered(struct tee_shm *shm, struct udevice *dev);
|
/external/bcc/tools/ |
D | shmsnoop_example.txt | 3 shmsnoop traces shm*() syscalls, for example: 16 Every call the shm* syscall (SHM column) is displayed 24 This works by tracing shm* system calls and sending 49 Trace shm*() syscalls 61 ./shmsnoop # trace all shm*() syscalls
|
/external/skqp/infra/lottiecap/docker/ |
D | README.md | 24 Of note, some versions (generally before Chrome 60) run out of space on /dev/shm when 26 with the flag --shm-size=2gb. 32 docker run -it --shm-size=2gb lottie-web-puppeteer /bin/bash 56 Of note, some versions (generally before Chrome 60) run out of space on /dev/shm when 58 with the flag --shm-size=2gb. 64 docker run -it --shm-size=2gb gold-lottie-web-puppeteer /bin/bash
|
/external/skia/infra/lottiecap/docker/ |
D | README.md | 24 Of note, some versions (generally before Chrome 60) run out of space on /dev/shm when 26 with the flag --shm-size=2gb. 32 docker run -it --shm-size=2gb lottie-web-puppeteer /bin/bash 56 Of note, some versions (generally before Chrome 60) run out of space on /dev/shm when 58 with the flag --shm-size=2gb. 64 docker run -it --shm-size=2gb gold-lottie-web-puppeteer /bin/bash
|
/external/mesa3d/src/gallium/winsys/sw/xlib/ |
D | xlib_sw_winsys.c | 79 Bool shm; /** Using shared memory images? */ member 171 xlib_dt->shm = False; in alloc_shm_ximage() 193 xlib_dt->shm = False; in alloc_shm_ximage() 198 xlib_dt->shm = True; in alloc_shm_ximage() 208 if (xlib_dt->shm) { in alloc_ximage() 343 if (xlib_dt->shm) { in xlib_sw_display() 419 xlib_dt->shm = True; in xlib_displaytarget_create()
|