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

Why an allocator? #1

Open
burdges opened this issue Jun 19, 2015 · 1 comment
Open

Why an allocator? #1

burdges opened this issue Jun 19, 2015 · 1 comment

Comments

@burdges
Copy link

burdges commented Jun 19, 2015

I noticed that libsodium's memory managment encurages using allocators too, although they also offer the mlock, munlock, and memzero seperately too. Is an allocator used here only because constructors are just by convention in Rust?

Are there sitautions in which it suffices to simply call memzero via a newtype_drop macro, as used in sodiumoxide? Are there reasons private key material should not be kept on the stack? Is it for example bad to call madvice or mlock on the stack?

Apologies for the dumb qustions. ;)

@burdges
Copy link
Author

burdges commented Jun 19, 2015

Appears allocators are not completely sorted out in Rust yet anyways rust-lang/rfcs#538 although maybe that does not matter here.

@burdges burdges changed the title Whay an allocator? Why an allocator? Jun 19, 2015
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