about summary refs log tree commit diff
path: root/src/libarena
AgeCommit message (Collapse)AuthorLines
2020-06-02Rename directories for some compiler crates from `libx` to `librustc_x`Vadim Petrochenkov-903/+0
libarena -> librustc_arena libfmt_macros -> librustc_parse_format libgraphviz -> librustc_graphviz libserialize -> librustc_serialize
2020-05-13Be less aggressive with `DroplessArena`/`TypedArena` growth.Nicholas Nethercote-13/+26
`DroplessArena` and `TypedArena` use an aggressive growth strategy: the first chunk is 4 KiB, the second is 8 KiB, and it keeps on doubling indefinitely. DHAT profiles show that sometimes this results in large chunks (e.g. 16-128 MiB) that are barely filled. Although these don't contribute to RSS, they clog up the DHAT profiles. This commit changes things so that the doubling stops at 2 MiB. This is large enough that chunk allocations are still rare (you might get 100s instead of 10s of them) but avoids lots of unused space in the worst case. It gives a slight speed-up to cycle counts in some cases.
2020-05-13Fix the new capacity measurement in arenas.Nicholas Nethercote-2/+2
For the given code paths, the amount of space used in the previous chunk is irrelevant. (This will almost never make a difference to behaviour, but it makes the code clearer.)
2020-03-21separate out an arena for HIRMazdak Farrokhzad-2/+3
2020-03-21move move stuff into declare_arena!Mazdak Farrokhzad-0/+100
2020-03-21move DropArena -> libarenaMazdak Farrokhzad-0/+81
2020-01-11Remove SyncTypedArena, SyncDroplessArena and in_arenaJohn Kåre Alsaker-73/+0
2019-12-22Format the worldMark Rousskov-49/+23
2019-12-03Fix TypedArena.Camille GILLOT-47/+12
2019-11-04bump smallvec to 1.0Ralf Jung-1/+1
2019-10-01Fix clippy warningsYuki Okushi-1/+1
2019-07-28Deny `unused_lifetimes` through rustbuildVadim Petrochenkov-2/+0
2019-07-28Remove lint annotations in specific crates that are already enforced by ↵Vadim Petrochenkov-1/+0
rustbuild Remove some random unnecessary lint `allow`s
2019-07-25Auto merge of #60340 - mgeier:cap-vs-capacity, r=alexcrichtonbors-3/+3
Rename .cap() methods to .capacity() As mentioned in #60316, there are a few `.cap()` methods, which seem out-of-place because such methods are called `.capacity()` in the rest of the code. This PR renames them to `.capacity()` but leaves `RawVec::cap()` in there for backwards compatibility. I didn't try to mark the old version as "deprecated", because I guess this would cause too much noise.
2019-07-07rustc: Remove `dylib` crate type from most rustc cratesAlex Crichton-1/+0
Now that procedural macros no longer link transitively to libsyntax, this shouldn't be needed any more! This commit is an experiment in removing all dynamic libraries from rustc except for librustc_driver itself. Let's see how far we can get with that!
2019-06-24Enable internal lints in bootstrapflip1995-1/+0
2019-06-17Make use of `ptr::null(_mut)` instead of casting zeroLzu Tao-4/+4
2019-06-16Separate libarena::lib modulechansuke-215/+214
2019-06-11Add deny(unused_lifetimes) to all the crates that have deny(internal).Eduard-Mihai Burtescu-0/+1
2019-05-23Optimize alloc_from_iterJohn Kåre Alsaker-5/+24
2019-04-27Rename .cap() methods to .capacity()Matthias Geier-3/+3
... but leave the old names in there for backwards compatibility.
2019-04-17Deny `internal` in stage0Mateusz Mikuła-1/+1
2019-04-14Rollup merge of #59675 - SimonSapin:stable-alloc, r=alexcrichtonMazdak Farrokhzad-1/+0
Stabilize the `alloc` crate. This implements RFC 2480: * https://github.com/rust-lang/rfcs/pull/2480 * https://github.com/rust-lang/rfcs/blob/master/text/2480-liballoc.md Closes https://github.com/rust-lang/rust/issues/27783
2019-04-12Stabilize the `alloc` crate.Simon Sapin-1/+0
This implements RFC 2480: * https://github.com/rust-lang/rfcs/pull/2480 * https://github.com/rust-lang/rfcs/blob/master/text/2480-liballoc.md Closes https://github.com/rust-lang/rust/issues/27783
2019-04-03Deny internal lints on non conflicting cratesflip1995-0/+1
- libarena - librustc_allocator - librustc_borrowck - librustc_codegen_ssa - librustc_codegen_utils - librustc_driver - librustc_errors - librustc_incremental - librustc_metadata - librustc_passes - librustc_privacy - librustc_resolve - librustc_save_analysis - librustc_target - librustc_traits - libsyntax - libsyntax_ext - libsyntax_pos
2019-04-01Add ensure_capacity and rename min to lenJohn Kåre Alsaker-15/+26
2019-04-01Use set_lenJohn Kåre Alsaker-2/+2
2019-04-01Support allocating iterators with arenasJohn Kåre Alsaker-16/+129
2019-02-11libarena => 2018Mazdak Farrokhzad-10/+11
2019-02-07Remove images' url to make it work even without internet connectionGuillaume Gomez-3/+1
2019-01-01Check the correct arenaOliver Scherer-0/+5
2018-12-25Remove licensesMark Rousskov-10/+0
2018-12-02Auto merge of #56378 - ljedrz:arena_tweaks, r=nagisabors-10/+14
arena: speed up TypedArena::clear and improve common patterns - speed up `TypedArena::clear`: improves its performance by up to **33%** (in case of a single entry) - simplify `DroplessArena::in_arena`
2018-12-02arena: improve common patternsljedrz-7/+2
2018-11-30arena: speed up TypedArena::clearljedrz-3/+12
2018-11-30Inline thingsJohn Kåre Alsaker-0/+2
2018-10-19Update TypedArena testsOliver Scherer-11/+11
2018-10-19Prefer `Default::default` over `FxHash*::default` in struct constructorsOliver Scherer-20/+12
2018-09-27Bump to 1.31.0 and bootstrap from 1.30 betaJosh Stone-1/+1
2018-09-11stabalize infer outlives requirements (RFC 2093).toidiu-1/+0
Co-authored-by: nikomatsakis
2018-08-24check that adding infer-outlives requirement to all crates worksNiko Matsakis-0/+1
2018-08-20Replace usages of ptr::offset with ptr::{add,sub}.Corey Farwell-2/+2
2018-08-09[nll] libarena: enable feature(nll) for bootstrapmemoryruins-0/+1
2018-07-25Deny bare_trait_objects globallyTatsuyuki Ishi-1/+0
2018-07-12Deny bare trait objects in the rest of rustljedrz-0/+1
2018-06-29Make raw_vec perma-unstable and hiddenSimon Sapin-0/+1
2018-05-27Make &Slice a thin pointerJohn Kåre Alsaker-25/+34
2018-05-17Switch to 1.26 bootstrap compilerMark Simulacrum-1/+0
2018-04-15Make arenas thread safeJohn Kåre Alsaker-0/+74
2018-04-08Move deny(warnings) into rustbuildMark Simulacrum-1/+0
This permits easier iteration without having to worry about warnings being denied. Fixes #49517