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

Support Arena Allocators #1095

Open
y86-dev opened this issue Aug 6, 2024 · 0 comments
Open

Support Arena Allocators #1095

y86-dev opened this issue Aug 6, 2024 · 0 comments

Comments

@y86-dev
Copy link
Member

y86-dev commented Aug 6, 2024

The current proposal for our own allocator trait does not support carrying allocator information (ie the methods do not take &self but are free standing functions). This prevents implementation of arena allocators, as they carry the space that can be allocated.

The reason that the current proposal has this limitation is #[derive(SmartPointer)]: it can only be used on repr(transparent) structs, preventing a non-ZST allocator: A field. The problem of allowing non-repr(transparent) structs under #[derive(SmartPointer)] is a complex one, see rust-lang/rfcs#3621. But it might eventually be possible to do so. This issue tracks if/when it is possible to change the allocator trait to accommodate arena allocators (and other stateful allocators).

cc @dakr

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

No branches or pull requests

1 participant