Replies: 1 comment
-
Technically this is possible. We already have support for mapping shared memory with the Linux sandbox, it's just the sharing of this memory is limited between the host and the worker process which hosts the guest program, however internally there's nothing really preventing us from mapping the same piece of shared memory between multiple guest programs, or reusing the same piece of memory between separate program invocations. That said, at this moment I have no plans to implement nor support such a use case, since JAM doesn't need it. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Just like OS can map device's memory into address space accessible by the process, I'm wondering if something similar could be done here to avoid memory copies.
For example I might have a piece of memory allocated by the host, then call a few different programs that manipulate that memory directly instead of copying it to and from each program's memory every time.
This could make use of address space beyond 32-bit, such that memory allocations with
sbrk
do not collide with it. Otherwise host can't even allocate memory without active cooperation with guest's allocator, which is an annoying level of coupling and will probably make it harder to use generic memory allocators.Does this make any sense?
Beta Was this translation helpful? Give feedback.
All reactions