| Age | Commit message (Collapse) | Author | Lines | |
|---|---|---|---|---|
| 2015-10-31 | Fix excessive memory allocation in RawVec::reserve | Stepan Koltsov | -3/+49 | |
| Before this patch `reserve` function allocated twice as requested amount elements (not twice as capacity). It leaded to unnecessary excessive memory usage in scenarios like this: ``` let mut v = Vec::new(); v.push(17); v.extend(0..10); println!("{}", v.capacity()); ``` `Vec` allocated 22 elements, while it could allocate just 11. `reserve` function must have a property of keeping `push` operation cost (which calls `reserve`) `O(1)`. To achieve this `reserve` must exponentialy grow its capacity when it does reallocation. There's better strategy to implement `reserve`: ``` let new_capacity = max(current_capacity * 2, requested_capacity); ``` This strategy still guarantees that capacity grows at `O(1)` with `reserve`, and fixes the issue with `extend`. Patch imlpements this strategy. | ||||
| 2015-10-30 | Typo fix | Simon Sapin | -1/+1 | |
| … I think. | ||||
| 2015-10-13 | Correct spelling in docs | Andrew Paseltiner | -5/+5 | |
| 2015-10-11 | Run rustfmt on liballoc. | Ahmed Charles | -5/+13 | |
| 2015-10-06 | Add RFC 1238's `unsafe_destructor_blind_to_params` (UGEH) where needed. | Felix S. Klock II | -0/+1 | |
| I needed it in `RawVec`, `Vec`, and `TypedArena` for `rustc` to bootstrap; but of course that alone was not sufficient for `make check`. Later I added `unsafe_destructor_blind_to_params` to collections, in particular `LinkedList` and `RawTable` (the backing representation for `HashMap` and `HashSet`), to get the regression tests exercising cyclic structure from PR #27185 building. ---- Note that the feature is `dropck_parametricity` (which is not the same as the attribute's name). We will almost certainly vary our strategy here in the future, so it makes some sense to have a not-as-ugly name for the feature gate. (The attribute name was deliberately selected to be ugly looking.) | ||||
| 2015-09-24 | Better function calls | Nick Cameron | -4/+12 | |
| 2015-09-24 | rustfmt liballoc | Nick Cameron | -18/+38 | |
| 2015-08-15 | Reduce libcore/liballoc's dependence on pointer sizes | Dylan McKay | -6/+4 | |
| 2015-07-17 | Add RawVec to unify raw Vecish code | Alexis Beingessner | -0/+453 | |
