-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Allocators, take III #1398
Allocators, take III #1398
Commits on Dec 6, 2015
-
Configuration menu - View commit details
-
Copy full SHA for 80740ba - Browse repository at this point
Copy the full SHA 80740baView commit details -
Configuration menu - View commit details
-
Copy full SHA for 738ebe3 - Browse repository at this point
Copy the full SHA 738ebe3View commit details -
Configuration menu - View commit details
-
Copy full SHA for af6090f - Browse repository at this point
Copy the full SHA af6090fView commit details
Commits on Dec 7, 2015
-
Configuration menu - View commit details
-
Copy full SHA for be627c2 - Browse repository at this point
Copy the full SHA be627c2View commit details -
Configuration menu - View commit details
-
Copy full SHA for cf0bba1 - Browse repository at this point
Copy the full SHA cf0bba1View commit details
Commits on Dec 16, 2015
-
Configuration menu - View commit details
-
Copy full SHA for e76929e - Browse repository at this point
Copy the full SHA e76929eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 087f4c1 - Browse repository at this point
Copy the full SHA 087f4c1View commit details -
Configuration menu - View commit details
-
Copy full SHA for af0b05f - Browse repository at this point
Copy the full SHA af0b05fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 533bcf8 - Browse repository at this point
Copy the full SHA 533bcf8View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1fc45cd - Browse repository at this point
Copy the full SHA 1fc45cdView commit details -
Configuration menu - View commit details
-
Copy full SHA for 553d59e - Browse repository at this point
Copy the full SHA 553d59eView commit details
Commits on Mar 16, 2016
-
Configuration menu - View commit details
-
Copy full SHA for d9a9f2d - Browse repository at this point
Copy the full SHA d9a9f2dView commit details -
Configuration menu - View commit details
-
Copy full SHA for fe88acf - Browse repository at this point
Copy the full SHA fe88acfView commit details -
Configuration menu - View commit details
-
Copy full SHA for 2cdb575 - Browse repository at this point
Copy the full SHA 2cdb575View commit details -
Configuration menu - View commit details
-
Copy full SHA for b6c0050 - Browse repository at this point
Copy the full SHA b6c0050View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5138a32 - Browse repository at this point
Copy the full SHA 5138a32View commit details -
(This really was an improvement, if only because it forced me to realize that in some contexts in the text I was using the word "kind" to mean something different than the layout structures being passed around... which sometimes can seem like a nice pun, but overall I suspect it was just a net increase in potential confusion.)
Configuration menu - View commit details
-
Copy full SHA for 4aa94d9 - Browse repository at this point
Copy the full SHA 4aa94d9View commit details -
revised
fn oom
interface to also take theSelf::Error
as input, s……o that contextual information can be fed back into the allocator itself. Though on further review, the comment that inspired this, rust-lang#1398 (comment) also wanted a `FormatArgs` argument too, so that the client code could feed back in arbitrary info.
Configuration menu - View commit details
-
Copy full SHA for e2d461c - Browse repository at this point
Copy the full SHA e2d461cView commit details -
Expanded docs for
AllocError
trait's methods.Added unresolved Q about the new `fn oom` method.
Configuration menu - View commit details
-
Copy full SHA for 05c9635 - Browse repository at this point
Copy the full SHA 05c9635View commit details -
Configuration menu - View commit details
-
Copy full SHA for a93abd7 - Browse repository at this point
Copy the full SHA a93abd7View commit details -
Configuration menu - View commit details
-
Copy full SHA for cad7d43 - Browse repository at this point
Copy the full SHA cad7d43View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5ae8038 - Browse repository at this point
Copy the full SHA 5ae8038View commit details -
amend discussion of
&mut self
with explicit note aboutwhy `impl Allocator for &mut MyUniqAlloc` cannot just rely on reborrows to handle satisfying `self` parameters.
Configuration menu - View commit details
-
Copy full SHA for dd485fd - Browse repository at this point
Copy the full SHA dd485fdView commit details -
Configuration menu - View commit details
-
Copy full SHA for d9232de - Browse repository at this point
Copy the full SHA d9232deView commit details -
Configuration menu - View commit details
-
Copy full SHA for 2f3034a - Browse repository at this point
Copy the full SHA 2f3034aView commit details
Commits on Mar 17, 2016
-
Fix code to reflect that
fn dealloc
method no longer returnsResult
.Remove `fn dealloc_unchecked` method since it no longer provides any benefit over `fn dealloc` anymore, since `fn dealloc` no longer has any preconditions to check (*). (*) Or at least, if it *does* choose to check preconditions (like "was the address part of my set of memory blocks?"), there is no longer way for `fn dealloc` to signal an error condition besides `panic`, and I do not think trying to prepare for that hypothetical scenario is worth adding the `fn dealloc_unchecked` method to the API.
Configuration menu - View commit details
-
Copy full SHA for 3a597f9 - Browse repository at this point
Copy the full SHA 3a597f9View commit details -
Configuration menu - View commit details
-
Copy full SHA for 40c84c2 - Browse repository at this point
Copy the full SHA 40c84c2View commit details -
"fixed"
oom
default method impl (theabort
intrinisic requires `u……nsafe`) (Though to be honest revisiting this made me wonder if I should just require clients to implement `fn oom` themselves.)
Configuration menu - View commit details
-
Copy full SHA for 06e2263 - Browse repository at this point
Copy the full SHA 06e2263View commit details -
Updated implementation to reflect that
Layout
(neeKind
) is no lo……nger `Copy`. (I should have done this as part of the earlier commit that removed `deriving(Copy)` from `Layout`.)
Configuration menu - View commit details
-
Copy full SHA for 34d019d - Browse repository at this point
Copy the full SHA 34d019dView commit details -
Configuration menu - View commit details
-
Copy full SHA for ede39d0 - Browse repository at this point
Copy the full SHA ede39d0View commit details -
Added missing
Sync
impl forDumbBumpPool
, and also fixed some pri……vacy oversights from earlier. The demo code is still not perfect (it currently presumes `Vec::new_in` addition, which is not great since another part of the RFC now says that standard library integration is specifically not addressed by this RFC). I'm working on revising the demo but I don't think that should hold up overall discussion.
Configuration menu - View commit details
-
Copy full SHA for ffdf71e - Browse repository at this point
Copy the full SHA ffdf71eView commit details
Commits on Mar 18, 2016
-
lifted the
fmt::Debug
bound from associated type up toAllocError
…… trait itself. (The only place where `AllocError` is used is as a bound on that associated type, so does not present any additional burden on clients of `Allocator` itself, though it does rule out certain pathological programmtic constructions that I'm not worried about.)
Configuration menu - View commit details
-
Copy full SHA for 9eae82d - Browse repository at this point
Copy the full SHA 9eae82dView commit details -
Extended
AllocErr
enum variants with more contextual info about all……ocation failure cause. The important one: for `Unsupported` operations, lets have the allocator be able to provide more context about what was unsupported. (I chose `&'static str` here because that avoids allocation integration for the error message, but I would love to be convinced that we could employ `Cow<'static, str>` here instead, since that would be much more general purpose.) And since I was adding contextual information anyway, I decided to have the memory exhausted variant carry along the particular `Layout` straw that broke the camel's back. (Note that the `MemoryExhausted` *struct* still remains zero-sized.)
Configuration menu - View commit details
-
Copy full SHA for 59ed824 - Browse repository at this point
Copy the full SHA 59ed824View commit details -
Added section on allocator trait objects.
This includes the changes that were absolutely necessary to support them in the `Allocator` trait itself, as well as an (opinionated) type alias, `AllocatorObj`, for defining allocator trait objects.
Configuration menu - View commit details
-
Copy full SHA for fe9a9b2 - Browse repository at this point
Copy the full SHA fe9a9b2View commit details -
Configuration menu - View commit details
-
Copy full SHA for 792eb31 - Browse repository at this point
Copy the full SHA 792eb31View commit details
Commits on Apr 1, 2016
-
Most of the changes suggested by feedback during FCP period.
* Removed associated `Error` type from `Allocator` trait; all methods now use `AllocErr` for error type. Removed `AllocError` trait and `MemoryExhausted` error. * Removed `fn max_size` and `fn max_align` methods; we can put them back later if someone demonstrates a need for them. * Added `fn realloc_in_place`.
Configuration menu - View commit details
-
Copy full SHA for 5a3abd2 - Browse repository at this point
Copy the full SHA 5a3abd2View commit details -
Allow
Layout
to represent zero-sized layouts. Removed uses of `NonZ……ero`. Revised specifications of (hopefully all) relevant methods to indicate that they may or may not support allocation of zero-sized layouts (but they should return an appropriate `Err` when given such). (Now, the requirement to return an `Err` does imply a branch that arguably we would like to avoid. It would be good to double-check this, and potentially try to inline the initial checks into the call site.)
Configuration menu - View commit details
-
Copy full SHA for 7c2c444 - Browse repository at this point
Copy the full SHA 7c2c444View commit details -
Configuration menu - View commit details
-
Copy full SHA for 117e5fc - Browse repository at this point
Copy the full SHA 117e5fcView commit details