3,204 questions
3
votes
1
answer
64
views
Accessing any object type from multiprocessing shared_memory?
Suppose I create a shared memory object:
from multiprocessing import shared_memory
shm_a = shared_memory.SharedMemory(create=True, size=1024)
buffer = shm_a.buf
and put a generic object of a generic ...
1
vote
1
answer
88
views
php Sharing data between Cli and WEB ownership problems
I have a service that execute some bash scripts based on external events, in this scripts I call php cli to execute some php code running with account "A".
I have a web site that needs some ...
2
votes
2
answers
81
views
Is it possible to create numpy array in shared_memory using custom dtypes?
I can succesfully create numpy arrays with simple dtypes (int32 etc).
But when i try to use something like :
b_shared_memory = shared_memory.SharedMemory(create=True, name = "test235", size =...
0
votes
1
answer
141
views
How to properly use VK_KHR_external_memory for sharing memory between two processes using Vulkan API
I am trying to share memory between two Vulkan processes (using the same NVidia gpu device) using the VK_KHR_external memory extension on Linux (Ubuntu 22). I create a buffer/device memory (and ...
0
votes
1
answer
143
views
Shared memory leaks in Python 3
I experience problems with SharedMemory() in Python 3.12.0, it is not properly released. I use below context manager to handle share memory segments:
@contextmanager
def managed_shm(name=None, size=0, ...
2
votes
1
answer
100
views
shared red black tree among processes
I want to create a red-black tree that it is shared among different forked processes.
Linking to an old question of mine old_question there cannot be resizable data structures in the shared memory (...
0
votes
0
answers
58
views
Does the mirai package use shared memory parallelism?
Does the mirai R package use shared memory parallelism?
The parallel package uses shared memory parallelism with the mc* (e.g. mclapply) functions and fork clusters, in the sense that the input data ...
0
votes
0
answers
15
views
lockf for shm_open fd
Using shm_open to communicate between client and server. How to guarantee client and server will not double initialize.
// server.c
int main() {
int shm_fd = shm_open("/my_shm", O_CREAT |...
1
vote
1
answer
64
views
Can pthread_barrier_t be used across multiple processes with shared memory?
I'm working on a C++ application that launches multiple processes. All of them load the same executable and share a memory region using shm_open + mmap.
In that shared memory, we store a ...
2
votes
0
answers
101
views
Shared memory between RISCV vm (using Qemu) and host
I can't set correctly shared memory for Qemu RISCV emulation.
My intention is to create a portion of shared memory between Qemu RISCV emulator and the host server. I need this because my intention ...
4
votes
1
answer
104
views
Shared memory disappears after writer process finishes, even though shmctl is not used to remove it
I am using System V shared memory in my program. The writer process successfully creates the shared memory using shmget(). When the writer process ends, I notice that the shared memory segment ...
7
votes
2
answers
448
views
Best Approach for Managing Shared Memory Cleanup on Linux?
I am trying to create a Rust library to simplify working with shared memory on Linux. Processes would only be able to request shared memory through the library, but I cannot guarantee that they won't ...
2
votes
0
answers
80
views
Memory Lock Without Atomic RMW Operations
I'm working with a fiber-optic reflective memory card (RFM2g model), which lacks atomic read-modify-write operations. My goal is to implement a spinlock across multiple processes (potentially running ...
0
votes
1
answer
83
views
shared list among processes in C modifications do not reflect in the list again
I am trying a simple programm that creates multiple processes, each process takes a pair of an int and a bool from a list changes the boolean value and reinserts it if it is found false otherwise just ...
2
votes
3
answers
97
views
Splitting a MemoryMappedFile into 2 chunks of data in C#
I'm trying to create a MemoryMappedFile with 2 view accessors, each accessing different regions of this shared memory.
This is a simplified version of what I'm doing:
const int block1Size = 20;
const ...