Skip to content

Use a TypedArena in ty::ctxt. - #12809

Merged
bors merged 4 commits into
rust-lang:masterfrom
eddyb:ty-arena
Sep 8, 2014
Merged

Use a TypedArena in ty::ctxt.#12809
bors merged 4 commits into
rust-lang:masterfrom
eddyb:ty-arena

Conversation

@eddyb

Copy link
Copy Markdown
Contributor

This was inspired by seeing a LLVM flatline of ~600MB when running rustc with jemalloc (each type's t_box_ is allocated on the heap, creating a lot of fragmentation, which jemalloc can deal with, unlike glibc).

@nikomatsakis

Copy link
Copy Markdown
Contributor

meta comment: It seems like a good idea to introduce a convention of using 'tcx for the lifetime of the type context, or something like that.

@eddyb

Copy link
Copy Markdown
ContributorAuthor

@nikomatsakis I'll wait and see how much this can be reduced with better lifetime variance inference support, and only then start adding 'tcx, but I like it otherwise.

@alexcrichton

Copy link
Copy Markdown
Member

ping, looks like this can be rebased now that the de-@ phase has landed

@eddyb

Copy link
Copy Markdown
ContributorAuthor

@alexcrichton I'm waiting for a snapshot so I can make traits generic over lifetimes (#12807), otherwise this would still be hacky.

@alexcrichton

Copy link
Copy Markdown
Member

I talked to @eddyb on IRC, and he said that this needs some more work, and to close it for now.

@eddyb

Copy link
Copy Markdown
ContributorAuthor

This is plagued by "pointer has a longer lifetime than the data it references" errors, sadly - see my comment on #10396.

@thestinger

Copy link
Copy Markdown
Contributor

This needs another rebase. I'm going to close it for now.

@emberianemberian reopened this Aug 30, 2014
@eddyb
eddybforce-pushed the ty-arena branch 4 times, most recently from def47e5 to a2473a8CompareSeptember 6, 2014 16:14
@emberian

Copy link
Copy Markdown
Contributor

r=me with rebase

@pcwalton

Copy link
Copy Markdown
Contributor

Do we know what the memory usage implications of this are?

bors added a commit that referenced this pull request Sep 8, 2014
This was inspired by seeing a LLVM flatline of **~600MB** when running rustc with jemalloc (each type's `t_box_` is allocated on the heap, creating a lot of fragmentation, which jemalloc can deal with, unlike glibc).
@bors
bors merged commit 8bfbcdd into rust-lang:masterSep 8, 2014
@eddyb
eddyb deleted the ty-arena branch September 8, 2014 20:51
bors added a commit to rust-lang-ci/rust that referenced this pull request Jul 25, 2022
bors added a commit to rust-lang-ci/rust that referenced this pull request May 30, 2024
… r=y21
Correctly handle closing parens in `missing_backticks` doc lint
Fixesrust-lang#12795.
changelog: Correctly handle closing parens in `doc_markdown` lint
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants

@eddyb@nikomatsakis@alexcrichton@thestinger@emberian@pcwalton@bors