Questions tagged [shared-memory]
The shared-memory tag has no usage guidance.
83
questions
0
votes
0
answers
61
views
What is the contribution of API to the memory usage of a process in linux as shown by pmap command?
I am trying to understand the memory usage of my program excluding the contribution of custom made API that creates and attaches to shared memory segment.
Following is the API code. I have included ...
2
votes
0
answers
56
views
Which consistency guarantees do POSIX shared memory objects have?
On Linux, POSIX shared memory objects [1] use a tmpfs via /dev/shm. A tmpfs in turn is said to "live completely in the page cache" [2] (I'm assuming swap has not been enabled). I am ...
0
votes
0
answers
25
views
Impact of using SHM_HUGE_1GB for a size much smaller than 1GB (say, 64MB)
I'm relatively new to actually using (not understanding) a shared memory in Linux. I'm dealing with the situation now where I need to allocate a contiguous chunk of shared 64MB memory. While picking ...
0
votes
1
answer
54
views
Can mmap be used to create a file which references memory subset of another file?
I'm interested in writing a program that can create two files, second file would be a "view" of first file and if modified, the first file would also be modified. Is this possible to do with ...
0
votes
0
answers
23
views
Tool to show memory that would be freed if I terminate a process and its sub processes?
I know that it's a bit tricky to show the memory that a process is using due to the fact that there is memory shared.
But when I look at memory diagnostics, it's normally because my memory is getting ...
0
votes
2
answers
368
views
Why does ftruncate with a shared memory object not use memory?
I've observed that I can create a shared memory object and give it ostensibly any size with ftruncate, regardless of the resource limits on my system. The code below sets the size to 262 TB, and ...
0
votes
0
answers
61
views
Is it possible to implement kvm/qemu VM guests and host connected through shared memory to collect and cache data between them
The configuration:
host: Ubuntu:20.04 OS
guest: Ubuntu20.04 OS
The two files use the 9p file system for interworking.
The mount command is as follows,
mount -t 9p -o trans=virtio tmp_shared /mnt -...
1
vote
1
answer
2k
views
Is it possible for two processes to use the same shared-memory without resorting to a file to obtain it, be it a memory-mapped file or /dev/shm file?
I'm curious because today the only way I know how to give two different processes the same shared-memory is through a memory-mapped file, in other words, both processes open the same memory-mapped ...
1
vote
1
answer
2k
views
How to Add some System Memory to be shared with the GPU in Linux?
I have switched from Windows 10 to linux mint 21.1
I tried playing GTA 5 on lutris (wine emulation) however the game is almost unplayable on linux as big parts of the map will not load because of my ...
0
votes
1
answer
204
views
Using IPC_CREAT with an already created shared memory segment
I am trying to figure out what will happen if I use the IPC_CREAT flag with shmget(). I have used a key of an already created shared memory segment from another process. When I did so, the calling ...
0
votes
1
answer
211
views
Shared Memory using shmget() and shmat()
We can create and attach a shared memory to a process using shmget() and shmat(). What will happen if we don't destroy and detach the shared memory in Ubuntu OS ? According to my understanding it will ...
0
votes
1
answer
377
views
shmget() and shmat()
Using shmget(), we can allocate a shared memory block of certain size in bytes and using shmat(), we attach this shared memory block to the address space of the calling process.
I need to check my ...
1
vote
1
answer
124
views
What shared memory is not controlled by SHMAX/SHMALL?
We are debugging a situation where the cached/shared memory increase and increase until the system reach OOM-killer.
We have set shmax and shmall in sysctl.conf but without any visible effect. Do we ...
0
votes
1
answer
870
views
Issues Using GPSD as Source for Chronyd
I am attempting to use a USB GPS without PPS dongle as the sole time source on Ubuntu 18.04. GPSD appears to be working correctly since cgps reports a 3D fix. However, I can't get chrony to see the ...
0
votes
0
answers
323
views
How pass a queue of data from kernel to user space?
I'm currently writing a module for Linux, and I want to pass a queue of data from kernel to user space (my program in userland being responsible for read this data - and then responsible for writing ...