Skip to content

Conversation

@Narfinger
Copy link
Contributor

This implements IpcSharedMemoryVec (similar to IpcSharedMemory).
This is an OS backed storage of a collection of bytes where we can add bytes to it.
We can access the bytes back with an IpcSharedMemoryIndex. Access is also facilitated with a IpcSharedMemoryVec::reader() method
which can be send over an ipc channel.

Currently this is an RFC because of two reasons:

  • IpcSharedMemoryIndex should be serialize/deserialize so we can actually send it.
  • Only the Unix implementation was implemented (and tested via tests and in servo context). Other implementations will follow.

Signed-off-by: Narfinger [email protected]

elements to it. This data structure is not allowed to be send over the
a channel but can easily get a reader which is allowed to be send but
not allowed to add.

Signed-off-by: Narfinger <[email protected]>
@Narfinger Narfinger force-pushed the ipc-shared-memory-vec branch from 7e6847f to e82554e Compare October 22, 2025 10:28
@Narfinger Narfinger closed this Oct 27, 2025
@sagudev
Copy link
Member

sagudev commented Oct 27, 2025

Hm, I am not sure that would work without anykind of cross process sync mechanism (Is that the reason for closing PR?).

@Narfinger Narfinger reopened this Oct 28, 2025
@Narfinger
Copy link
Contributor Author

Sorry, closed it by accident.
I think the synchronization will be done via the index. You can only access the storage if you have the index which enforces that it exists in the table. And because we never remove any elements this should be safe.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants