Questions tagged [shared-memory]
The shared-memory tag has no summary.
80 questions
0votes
0answers
66views
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 ...
2votes
0answers
185views
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 ...
0votes
1answer
96views
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 ...
0votes
2answers
763views
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 ...
1vote
1answer
4kviews
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 ...
1vote
1answer
5kviews
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 ...
1vote
1answer
287views
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 ...
0votes
1answer
275views
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 ...
0votes
1answer
499views
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 ...
1vote
1answer
136views
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 ...
0votes
1answer
1kviews
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 ...
0votes
0answers
454views
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 ...
2votes
1answer
750views
Browser (Opera, Chromium...) start causing Permission denied (13) error for shared memory
Using Manjaro / Arch linux, I wanted to install another browser. However, no matter whether I installed Opera or Chromium (via pacman) I always get an error when executing it (from both Application ...
0votes
1answer
72views
Can a process share unused memory with others?
I want to run about 200 processes with my experiments. Every of them really needs less than a GB: PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 24688 rinkman 20 0 ...
0votes
1answer
922views
Shared memory using shmget()
According to my understanding about shared memory is that it is a memory segment that is shared between two or more processes. Shared memory can be implemented using shmget() . However , since any ...