Verified Commit 14e275d8 authored by Tom Almeida's avatar Tom Almeida
Browse files

Made sure all tests and benches actually use ralloc as their global allocator

parent 647a67f9
......@@ -3,6 +3,9 @@
extern crate ralloc;
extern crate test;
#[global_allocator]
static ALLOCATOR: ralloc::Allocator = ralloc::Allocator;
#[bench]
fn bench_box(b: &mut test::Bencher) {
b.iter(|| {
......
......@@ -3,6 +3,9 @@
extern crate ralloc;
extern crate test;
#[global_allocator]
static ALLOCATOR: ralloc::Allocator = ralloc::Allocator;
use std::sync::mpsc;
use std::thread;
......
......@@ -5,5 +5,5 @@ extern crate test;
#[bench]
fn bench_sbrk(b: &mut test::Bencher) {
b.iter(|| ralloc::sbrk(200).unwrap());
b.iter(|| unsafe { ralloc::sbrk(200) });
}
#![feature(test)]
#[global_allocator]
static ALLOCATOR: ralloc::Allocator = ralloc::Allocator;
extern crate ralloc;
extern crate test;
......
#![feature(test)]
#[global_allocator]
static ALLOCATOR: ralloc::Allocator = ralloc::Allocator;
extern crate ralloc;
extern crate test;
......
......@@ -3,6 +3,9 @@
extern crate ralloc;
#[global_allocator]
static ALLOCATOR: ralloc::Allocator = ralloc::Allocator;
use std::sync::Arc;
use std::thread;
......
extern crate ralloc;
#[global_allocator]
static ALLOCATOR: ralloc::Allocator = ralloc::Allocator;
mod util;
#[inline(never)]
......
extern crate ralloc;
#[global_allocator]
static ALLOCATOR: ralloc::Allocator = ralloc::Allocator;
mod util;
use std::collections::BTreeMap;
......
extern crate ralloc;
#[global_allocator]
static ALLOCATOR: ralloc::Allocator = ralloc::Allocator;
mod util;
use std::thread;
......
extern crate ralloc;
#[global_allocator]
static ALLOCATOR: ralloc::Allocator = ralloc::Allocator;
mod util;
use std::thread;
......
extern crate ralloc;
#[global_allocator]
static ALLOCATOR: ralloc::Allocator = ralloc::Allocator;
mod util;
use std::ptr;
......
extern crate ralloc;
#[global_allocator]
static ALLOCATOR: ralloc::Allocator = ralloc::Allocator;
mod util;
#[test]
......
extern crate ralloc;
#[global_allocator]
static ALLOCATOR: ralloc::Allocator = ralloc::Allocator;
#[test]
fn minimal() {
let a = Box::new(1);
......
extern crate ralloc;
#[global_allocator]
static ALLOCATOR: ralloc::Allocator = ralloc::Allocator;
mod util;
use std::sync::mpsc;
......
extern crate ralloc;
#[global_allocator]
static ALLOCATOR: ralloc::Allocator = ralloc::Allocator;
mod util;
use std::ptr;
......
extern crate ralloc;
#[global_allocator]
static ALLOCATOR: ralloc::Allocator = ralloc::Allocator;
mod util;
use std::ptr;
......
extern crate ralloc;
#[global_allocator]
static ALLOCATOR: ralloc::Allocator = ralloc::Allocator;
mod util;
#[test]
......
extern crate ralloc;
#[global_allocator]
static ALLOCATOR: ralloc::Allocator = ralloc::Allocator;
mod util;
#[test]
......
extern crate ralloc;
#[global_allocator]
static ALLOCATOR: ralloc::Allocator = ralloc::Allocator;
mod util;
#[test]
......
extern crate ralloc;
#[global_allocator]
static ALLOCATOR: ralloc::Allocator = ralloc::Allocator;
mod util;
use std::thread;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment