Skip to content

Commit b872900

Browse files
committed
auto merge of #6237 : dotdash/rust/reduce_bloat, r=brson
In commit d7f5e43 "core::rt: Add the local heap to newsched tasks", local_malloc and local_free have become rather big and their forced inlining causes quite a bit of code bloat. Compile times for crates affected by the bloat (e.g. rustc) improve, while others (e.g. libstd) seem to be unaffected, so I guess the inlining doesn't gain us much. Sizes: ``` | librustc | libsytax ---------------|–-----------|------------ with inlining | 18,547,824 | 7,110,848 w/o inlining | 15,092,040 | 5,518,608
2 parents 1f65e4a + e5ca35d commit b872900

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

src/libcore/unstable/lang.rs

-2
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,6 @@ pub unsafe fn local_malloc(td: *c_char, size: uintptr_t) -> *c_char {
9898
}
9999

100100
#[lang="malloc"]
101-
#[inline(always)]
102101
#[cfg(not(stage0))]
103102
pub unsafe fn local_malloc(td: *c_char, size: uintptr_t) -> *c_char {
104103
match context() {
@@ -129,7 +128,6 @@ pub unsafe fn local_free(ptr: *c_char) {
129128
// inside a landing pad may corrupt the state of the exception handler. If a
130129
// problem occurs, call exit instead.
131130
#[lang="free"]
132-
#[inline(always)]
133131
#[cfg(not(stage0))]
134132
pub unsafe fn local_free(ptr: *c_char) {
135133
match context() {

0 commit comments

Comments
 (0)