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

Consider letting the user do their own buffer allocation? #13

Open
rdaum opened this issue Aug 18, 2023 · 0 comments
Open

Consider letting the user do their own buffer allocation? #13

rdaum opened this issue Aug 18, 2023 · 0 comments

Comments

@rdaum
Copy link

rdaum commented Aug 18, 2023

Playing with Marble for my own fun project, and looking at the implementation of get, I was wondering if you'd consider adding an API that lets uses provide their own callback for buffer allocation?

In my case I would like to be allocating into my own bespoke buffer pool, which is based vaguely/roughly on the techniques described in the Umbra paper (https://db.in.tum.de/~freitag/papers/p29-neumann-cidr20.pdf). And I would prefer not to have an extra copy/move step into those buffers after doing my work with Marble.

I'm imagining something like being able to pass something like an FnMut(usize)->Pin<&mut [T]> as an alloc_fn or similar? Marble still might need to read and compose the header_buf separately, but the work done with uninit_boxed_slice could be done instead by the user's provided buffer allocation routine.

Not sure if this makes sense for your overall design or not, but something to consider.

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