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

Add a deinitialize method to the Alloc trait #1

Open
nikomatsakis opened this issue May 2, 2014 · 1 comment
Open

Add a deinitialize method to the Alloc trait #1

nikomatsakis opened this issue May 2, 2014 · 1 comment

Comments

@nikomatsakis
Copy link
Owner

@huonw pointed out that types like Vec that peddle in deinitialized memory must have a way to eliminate stray references. The allocator can initialize memory when it is given out initially, but can't handle the case where data was pushed and then popped.

cc @pnkfelix

@pnkfelix
Copy link

pnkfelix commented May 3, 2014

hmm. This could have been handled by the old vector design (where the heap-allocated object carried the length and capacity), but that ship has sailed.

So yes, it seems like types like Vec need to invoke some sort of callback on the allocator (which may then just zero out the memory, or store the info in some other metadata structure somewhere, or ignore it entirely in the case of a conservative scheme ... assuming the the latter is actually an option).

nikomatsakis pushed a commit that referenced this issue Dec 23, 2014
Add drain, and link to WIP implementations.
nikomatsakis pushed a commit that referenced this issue Feb 9, 2015
Mention ChanReader/ChanWriter will be unstable
nikomatsakis pushed a commit that referenced this issue Sep 28, 2015
Modify read_full/read_exact RFC
nikomatsakis pushed a commit that referenced this issue Feb 5, 2016
Add specifics around feature gates
nikomatsakis pushed a commit that referenced this issue Mar 21, 2016
nikomatsakis pushed a commit that referenced this issue Jan 19, 2017
Explicit type punning alternative.
nikomatsakis pushed a commit that referenced this issue Jun 9, 2017
Update 0000-trait-alias.md
nikomatsakis pushed a commit that referenced this issue Aug 2, 2017
A lot of misc changes to extern types
nikomatsakis pushed a commit that referenced this issue Aug 2, 2017
nikomatsakis pushed a commit that referenced this issue Apr 11, 2019
rfc, const-repeat-expr: notes on is_rvalue_promotable(expr)
nikomatsakis pushed a commit that referenced this issue Jan 14, 2020
RFC 2582: Fix typo (must not -> need not)
nikomatsakis pushed a commit that referenced this issue Feb 19, 2021
nikomatsakis pushed a commit that referenced this issue Jun 5, 2024
…olicy

Clarify that audits evaluate both moderation policies and their application
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants