Skip to content

Update jemalloc again #31889

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

Merged
merged 2 commits into from
Mar 6, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions mk/cfg/i686-pc-windows-gnu.mk
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,3 @@ CFG_GNU_TRIPLE_i686-pc-windows-gnu := i686-w64-mingw32
CFG_THIRD_PARTY_OBJECTS_i686-pc-windows-gnu := crt2.o dllcrt2.o
CFG_INSTALLED_OBJECTS_i686-pc-windows-gnu := crt2.o dllcrt2.o rsbegin.o rsend.o
CFG_RUSTRT_HAS_STARTUP_OBJS_i686-pc-windows-gnu := 1
# FIXME(#31030) - there's not a great reason to disable jemalloc here
CFG_DISABLE_JEMALLOC_i686-pc-windows-gnu := 1
2 changes: 0 additions & 2 deletions mk/cfg/x86_64-pc-windows-gnu.mk
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,3 @@ CFG_GNU_TRIPLE_x86_64-pc-windows-gnu := x86_64-w64-mingw32
CFG_THIRD_PARTY_OBJECTS_x86_64-pc-windows-gnu := crt2.o dllcrt2.o
CFG_INSTALLED_OBJECTS_x86_64-pc-windows-gnu := crt2.o dllcrt2.o rsbegin.o rsend.o
CFG_RUSTRT_HAS_STARTUP_OBJS_x86_64-pc-windows-gnu := 1
# FIXME(#31030) - there's not a great reason to disable jemalloc here
CFG_DISABLE_JEMALLOC_x86_64-pc-windows-gnu := 1
2 changes: 1 addition & 1 deletion src/jemalloc
Submodule jemalloc updated 134 files
17 changes: 13 additions & 4 deletions src/test/compile-fail/allocator-dylib-is-system.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,9 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

// ignore-windows everything is the system allocator on windows
// ignore-musl no dylibs on musl yet
// ignore-bitrig no jemalloc on bitrig
// ignore-openbsd no jemalloc on openbsd
// ignore-musl no dylibs
// aux-build:allocator-dylib.rs
// aux-build:allocator1.rs
// no-prefer-dynamic
// error-pattern: cannot link together two allocators

Expand All @@ -23,7 +21,18 @@
#![feature(alloc_jemalloc)]

extern crate allocator_dylib;

// The main purpose of this test is to ensure that `alloc_jemalloc` **fails**
// here (specifically the jemalloc allocator), but currently jemalloc is
// disabled on quite a few platforms (bsds, emscripten, msvc, etc). To ensure
// that this just passes on those platforms we link in some other allocator to
// ensure we get the same error.
//
// So long as we CI linux/OSX we should be good.
#[cfg(any(target_os = "linux", target_os = "macos"))]
extern crate alloc_jemalloc;
#[cfg(not(any(target_os = "linux", target_os = "macos")))]
extern crate allocator1;

fn main() {
allocator_dylib::foo();
Expand Down
18 changes: 13 additions & 5 deletions src/test/compile-fail/allocator-rust-dylib-is-jemalloc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,9 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

// ignore-windows everything is the system allocator on windows
// ignore-musl no dylibs on musl right now
// ignore-bitrig no jemalloc on bitrig
// ignore-openbsd no jemalloc on openbsd
// ignore-musl no dylibs
// aux-build:allocator-dylib2.rs
// aux-build:allocator1.rs
// error-pattern: cannot link together two allocators

// Ensure that rust dynamic libraries use jemalloc as their allocator, verifying
Expand All @@ -21,9 +19,19 @@
#![feature(alloc_system)]

extern crate allocator_dylib2;

// The main purpose of this test is to ensure that `alloc_system` **fails**
// here (specifically the system allocator), but currently system is
// disabled on quite a few platforms (bsds, emscripten, msvc, etc). To ensure
// that this just passes on those platforms we link in some other allocator to
// ensure we get the same error.
//
// So long as we CI linux/OSX we should be good.
#[cfg(any(target_os = "linux", target_os = "macos"))]
extern crate alloc_system;
#[cfg(not(any(target_os = "linux", target_os = "macos")))]
extern crate allocator1;

fn main() {
allocator_dylib2::foo();
}

6 changes: 2 additions & 4 deletions src/test/run-pass/allocator-default.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,10 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#![feature(alloc_jemalloc, alloc_system)]
#![feature(alloc_jemalloc)]

#[cfg(not(any(windows, target_os = "bitrig", target_os = "openbsd", target_os="emscripten")))]
#[cfg(any(target_os = "linux", target_os = "macos"))]
extern crate alloc_jemalloc;
#[cfg(any(windows, target_os = "bitrig", target_os = "openbsd", target_os="emscripten"))]
extern crate alloc_system;

fn main() {
println!("{:?}", Box::new(3));
Expand Down
23 changes: 0 additions & 23 deletions src/test/run-pass/allocator-jemalloc.rs

This file was deleted.