Home
last modified time | relevance | path

Searched refs:shmem (Results 1 – 25 of 61) sorted by relevance

123

/external/liburing/test/
Dacross-fork.c137 struct forktestmem *shmem; in main() local
146 shmem = mmap(0, sizeof(struct forktestmem), PROT_READ|PROT_WRITE, in main()
148 if (!shmem) { in main()
153 pthread_barrierattr_init(&shmem->barrierattr); in main()
154 pthread_barrierattr_setpshared(&shmem->barrierattr, 1); in main()
155 pthread_barrier_init(&shmem->barrier, &shmem->barrierattr, 2); in main()
157 ret = io_uring_queue_init(10, &shmem->ring, 0); in main()
174 if (submit_write(&shmem->ring, shared_fd, "before fork: write shared fd\n", 0)) in main()
190 pthread_barrier_wait(&shmem->barrier); in main()
196 if (submit_write(&shmem->ring, shared_fd, "parent: write shared fd\n", 0)) in main()
[all …]
/external/crosvm/swap/src/
Dstaging.rs108 pub fn new(shmem: &SharedMemory, offset_bytes: u64, num_of_pages: usize) -> Result<Self> { in new()
110 .from_shared_memory(shmem) in new()
228 let shmem = SharedMemory::new("test staging memory", 200 * pagesize() as u64).unwrap(); in new_success() localVariable
229 assert!(StagingMemory::new(&shmem, 0, 200).is_ok()); in new_success()
243 let shmem = SharedMemory::new("test staging memory", 200 * pagesize() as u64).unwrap(); in copy_marks_as_present() localVariable
245 let mut staging_memory = StagingMemory::new(&shmem, 0, 200).unwrap(); in copy_marks_as_present()
271 let shmem = SharedMemory::new("test staging memory", 200 * pagesize() as u64).unwrap(); in page_content_default_is_none() localVariable
272 let staging_memory = StagingMemory::new(&shmem, 0, 200).unwrap(); in page_content_default_is_none()
279 let shmem = SharedMemory::new("test staging memory", 200 * pagesize() as u64).unwrap(); in page_content_returns_content() localVariable
281 let mut staging_memory = StagingMemory::new(&shmem, 0, 200).unwrap(); in page_content_returns_content()
[all …]
/external/ltp/testcases/kernel/containers/sysvipc/
Dshm_comm.c41 char *shmem; in chld1_shm() local
45 shmem = SAFE_SHMAT(id, NULL, 0); in chld1_shm()
46 *shmem = 'A'; in chld1_shm()
50 if (*shmem != 'A') in chld1_shm()
57 SAFE_SHMDT(shmem); in chld1_shm()
66 char *shmem; in chld2_shm() local
70 shmem = SAFE_SHMAT(id, NULL, 0); in chld2_shm()
74 *shmem = 'B'; in chld2_shm()
78 SAFE_SHMDT(shmem); in chld2_shm()
/external/perfetto/src/profiling/memory/
Dwire_protocol.cc60 int64_t WithBuffer(SharedRingBuffer* shmem, size_t total_size, F fn) { in WithBuffer() argument
61 if (total_size > shmem->size()) { in WithBuffer()
67 ScopedSpinlock lock = shmem->AcquireLock(ScopedSpinlock::Mode::Try); in WithBuffer()
73 buf = shmem->BeginWrite(lock, total_size); in WithBuffer()
77 shmem->EndWrite(std::move(buf)); in WithBuffer()
85 shmem->EndWrite(std::move(buf)); in WithBuffer()
91 int64_t SendWireMessage(SharedRingBuffer* shmem, const WireMessage& msg) { in SendWireMessage() argument
97 shmem, total_size, [msg](SharedRingBuffer::Buffer* buf) { in SendWireMessage()
111 shmem, total_size, [msg](SharedRingBuffer::Buffer* buf) { in SendWireMessage()
121 shmem, total_size, [msg](SharedRingBuffer::Buffer* buf) { in SendWireMessage()
Dunwinding.cc239 SharedRingBuffer& shmem = client_data.shmem; in OnDisconnect() local
240 client_data.drain_bytes = shmem.read_avail(); in OnDisconnect()
264 SharedRingBuffer& shmem = client_data.shmem; in FinishDisconnect() local
272 auto lock = shmem.AcquireLock(ScopedSpinlock::Mode::Try); in FinishDisconnect()
274 stats = shmem.GetStats(lock); in FinishDisconnect()
293 SharedRingBuffer& shmem = client_data->shmem; in ReadAndUnwindBatch() local
300 buf = shmem.BeginRead(); in ReadAndUnwindBatch()
305 res.bytes_read += shmem.EndRead(std::move(buf)); in ReadAndUnwindBatch()
354 client_data.shmem.SetReaderPaused(); in BatchUnwindJob()
476 std::move(handoff_data.shmem), in HandleHandoffSocket()
[all …]
Dclient.cc245 auto shmem = SharedRingBuffer::Attach(std::move(shmem_fd)); in CreateAndHandshake() local
246 if (!shmem || !shmem->is_valid()) { in CreateAndHandshake()
254 client_config, std::move(shmem.value()), in CreateAndHandshake()
260 SharedRingBuffer shmem, in Client() argument
267 shmem_(std::move(shmem)), in Client()
Dunwinding.h80 SharedRingBuffer shmem; member
116 SharedRingBuffer shmem; member
Dheapprofd_producer.cc888 int raw_fd = pending_process.shmem.fd(); in OnDataAvailable()
904 handoff_data.shmem = std::move(pending_process.shmem); in OnDataAvailable()
970 auto shmem = SharedRingBuffer::Create(static_cast<size_t>(shmem_size)); in HandleClientConnection() local
971 if (!shmem || !shmem->is_valid()) { in HandleClientConnection()
985 pending_process.shmem = std::move(*shmem); in HandleClientConnection()
/external/virglrenderer/src/proxy/
Dproxy_context.c495 if (ctx->shmem.ptr) in proxy_context_destroy()
496 munmap(ctx->shmem.ptr, ctx->shmem.size); in proxy_context_destroy()
497 if (ctx->shmem.fd >= 0) in proxy_context_destroy()
498 close(ctx->shmem.fd); in proxy_context_destroy()
570 atomic_uint *timeline_seqnos = ctx->shmem.ptr; in proxy_context_init_timelines()
615 ctx->shmem.fd = alloc_memfd("proxy-ctx", shmem_size, &ctx->shmem.ptr); in proxy_context_init_shmem()
616 if (ctx->shmem.fd < 0) in proxy_context_init_shmem()
619 ctx->shmem.size = shmem_size; in proxy_context_init_shmem()
634 .shmem_size = ctx->shmem.size, in proxy_context_init()
636 const int req_fds[2] = { ctx->shmem.fd, ctx->sync_thread.fence_eventfd }; in proxy_context_init()
[all …]
Dproxy_context.h41 } shmem; member
/external/virglrenderer/src/drm/msm/
Dmsm_renderer.c59 struct msm_shmem *shmem; member
338 if (mctx->shmem) in msm_renderer_destroy()
339 munmap(mctx->shmem, sizeof(*mctx->shmem)); in msm_renderer_destroy()
411 munmap(mctx->shmem, sizeof(*mctx->shmem)); in msm_renderer_detach_resource()
413 mctx->shmem = NULL; in msm_renderer_detach_resource()
496 if (mctx->shmem) { in msm_renderer_get_blob()
514 mctx->shmem = mmap(NULL, blob_size, PROT_WRITE | PROT_READ, MAP_SHARED, fd, 0); in msm_renderer_get_blob()
515 if (mctx->shmem == MAP_FAILED) { in msm_renderer_get_blob()
521 mctx->shmem->rsp_mem_offset = sizeof(*mctx->shmem); in msm_renderer_get_blob()
523 uint8_t *ptr = (uint8_t *)mctx->shmem; in msm_renderer_get_blob()
[all …]
Dmsm_proto.h47 #define msm_shmem_has_field(shmem, field) ({ \ argument
48 struct msm_shmem *_shmem = (shmem); \
/external/libchrome/base/memory/
Dshared_memory_unittest.cc475 SharedMemory shmem; in TEST_P() local
476 ASSERT_TRUE(shmem.CreateAndMapAnonymous(contents.size())); in TEST_P()
477 memcpy(shmem.memory(), contents.data(), contents.size()); in TEST_P()
478 EXPECT_TRUE(shmem.Unmap()); in TEST_P()
480 SharedMemoryHandle shared_handle = shmem.handle().Duplicate(); in TEST_P()
483 EXPECT_EQ(shared_handle.GetGUID(), shmem.handle().GetGUID()); in TEST_P()
484 EXPECT_EQ(shared_handle.GetSize(), shmem.handle().GetSize()); in TEST_P()
492 shared_handle = shmem.handle().Duplicate(); in TEST_P()
506 SharedMemory shmem; in TEST_P() local
507 ASSERT_TRUE(shmem.CreateAndMapAnonymous(kContents.size())); in TEST_P()
[all …]
/external/arm-trusted-firmware/fdts/
Dmorello.dtsi73 cpu_scp_hpri0: scp-shmem@0 {
74 compatible = "arm,scmi-shmem";
78 cpu_scp_hpri1: scp-shmem@80 {
79 compatible = "arm,scmi-shmem";
Dtc.dts229 cpu_scp_scmi_mem: scp-shmem@0 {
230 compatible = "arm,scmi-shmem";
262 shmem = <&cpu_scp_scmi_mem &cpu_scp_scmi_mem>;
/external/mesa3d/src/panfrost/bifrost/test/
Dbi_submit.c170 struct panfrost_bo *shmem = bit_bo_create(dev, 4096); in bit_vertex() local
172 pan_pack(shmem->ptr.cpu, LOCAL_STORAGE, cfg) { in bit_vertex()
196 cfg.thread_storage = shmem->ptr.gpu; in bit_vertex()
213 shmem, shader, shader_desc, ubo, var, attr in bit_vertex()
/external/perfetto/src/tracing/ipc/service/
Dproducer_ipc_service.cc88 std::unique_ptr<SharedMemory> shmem; in InitializeConnection() local
96 shmem = SharedMemoryWindows::Attach(req.shm_key_windows()); in InitializeConnection()
103 shmem = PosixSharedMemory::AttachToFd( in InitializeConnection()
105 if (!shmem) { in InitializeConnection()
123 req.shared_memory_page_size_hint_bytes(), std::move(shmem), in InitializeConnection()
/external/libchrome/ipc/
Dipc_message_utils_unittest.cc147 base::SharedMemory shmem; in TEST() local
148 ASSERT_TRUE(shmem.Create(options)); in TEST()
150 base::SharedMemoryHandle pre_pickle = shmem.handle().Duplicate(); in TEST()
/external/AFLplusplus/utils/afl_untracer/
DTODO1 * add shmem fuzzing
/external/autotest/server/site_tests/firmware_Cr50ConsoleCommands/
Dhelp.guc30 shmem
Dhelp32 shmem
/external/perfetto/docs/reference/
Dheap_profile-cli.md17 [--shmem-size SHMEM_SIZE] [--block-client]
92 `--shmem-size`
/external/libchrome/base/process/
Dprocess_metrics_unittest.cc192 EXPECT_EQ(meminfo.shmem, 140204); in TEST_F()
458 EXPECT_GT(info.shmem, 0); in TEST()
459 EXPECT_LT(info.shmem, info.total); in TEST()
/external/cronet/components/metrics/
Dsystem_memory_stats_recorder_linux.cc86 int mem_shmem_mb = memory.shmem / 1024; in RecordMemoryStats()
/external/libchrome/base/debug/
Dactivity_analyzer_unittest.cc224 std::unique_ptr<SharedMemory> shmem(new SharedMemory()); in TEST_F() local
225 ASSERT_TRUE(shmem->CreateAndMapAnonymous(kMemorySize)); in TEST_F()
226 handle1 = shmem->handle().Duplicate(); in TEST_F()
228 handle2 = shmem->handle().Duplicate(); in TEST_F()

123