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

The old memory mapping ringbuffer trick use-case #5

Open
Daniel-Abrecht opened this issue Jan 16, 2023 · 0 comments
Open

The old memory mapping ringbuffer trick use-case #5

Daniel-Abrecht opened this issue Jan 16, 2023 · 0 comments

Comments

@Daniel-Abrecht
Copy link

Daniel-Abrecht commented Jan 16, 2023

I would love multiple memories & memory mapping. But I'm unsure if this proposal could cover my use cases.

For example, in some of my programs, like in this library, I use memory mapping to make ring buffers: https://github.com/Daniel-Abrecht/ml666/blob/0d4111f7a47bbcfd84b8136526aa1510c02e820d/src/tokenizer.c#L133

Basically, I map 1 real page to 2 virtual pages next to each other, that way, there is always an offset in the first buffer, where I can read, and one where I can write, the whole used/free space continuously. I don't think this proposal would let me do that.

It' still better than nothing, though. I think I could still emulate APIs like sharing memory using files and/or unix sockets with this abstraction, with some limitations.

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

1 participant