Fix liballoc

This commit is contained in:
Steven Fackler 2014-09-28 22:07:45 -07:00 committed by Steven Fackler
parent c76151529a
commit 1e0c7b682f

View File

@ -111,12 +111,12 @@ unsafe fn exchange_free(ptr: *mut u8, size: uint, align: uint) {
// The minimum alignment guaranteed by the architecture. This value is used to
// add fast paths for low alignment values. In practice, the alignment is a
// constant at the call site and the branch will be optimized out.
#[cfg(target_arch = "arm")]
#[cfg(target_arch = "mips")]
#[cfg(target_arch = "mipsel")]
#[cfg(any(target_arch = "arm",
target_arch = "mips",
target_arch = "mipsel"))]
static MIN_ALIGN: uint = 8;
#[cfg(target_arch = "x86")]
#[cfg(target_arch = "x86_64")]
#[cfg(any(target_arch = "x86",
target_arch = "x86_64"))]
static MIN_ALIGN: uint = 16;
#[cfg(jemalloc)]
@ -146,7 +146,7 @@ mod imp {
}
// -lpthread needs to occur after -ljemalloc, the earlier argument isn't enough
#[cfg(not(windows), not(target_os = "android"))]
#[cfg(all(not(windows), not(target_os = "android")))]
#[link(name = "pthread")]
extern {}
@ -206,7 +206,7 @@ mod imp {
}
}
#[cfg(not(jemalloc), unix)]
#[cfg(all(not(jemalloc), unix))]
mod imp {
use core::cmp;
use core::ptr;
@ -268,7 +268,7 @@ mod imp {
pub fn stats_print() {}
}
#[cfg(not(jemalloc), windows)]
#[cfg(all(not(jemalloc), windows))]
mod imp {
use libc::{c_void, size_t};
use libc;