Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dynamically Growing/Allocatable SharedMemory Buffer (w/ code!) #11

Open
MikeFair opened this issue Feb 9, 2016 · 2 comments
Open

Dynamically Growing/Allocatable SharedMemory Buffer (w/ code!) #11

MikeFair opened this issue Feb 9, 2016 · 2 comments

Comments

@MikeFair
Copy link
Contributor

MikeFair commented Feb 9, 2016

Hi all,

I just posted the following Gist as an initial cut on making dynamic shared memory.
https://gist.github.com/MikeFair/6908afe26e0b84758ca4

The main idea is that (bufferPosition / blockSize) gives a unique segmentId.
"BufferName - [segmentId]" is then the file name of that segment which participants can test for the existence of and load them if they exist. if they do not exist, then participants can create them as they write data into those memory addressses.

There is no signalling happening about new segments; but attempts to read any segments that exist will be dynamically discovered.

Thanks!

@kasajian
Copy link

Can you explain how can be used?

@quicktrick
Copy link

I'm interested in this solution too. I need to fast transfer large portions of data of unpredictable volume. I can solve it by means of some intermediate CircularBuffer, but dynamically allocated shared memory looks more attractive. Now it's easier for me to make my own solution with CircularBuffer, because it's hard to study smb. else's code, but if there is more or less working solution, I'd like to try it. Could you please give some examples if any?

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

No branches or pull requests

3 participants