Skip to content

Commit ac731c5

Browse files
committed
Incorrect path in benchmarks
1 parent 801114a commit ac731c5

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

benches/roundtrip.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@
33
#![feature(test, allocator_api)]
44
#![cfg(feature = "alloc_trait")]
55

6-
extern crate jemallocator;
76
extern crate jemalloc_sys;
7+
extern crate jemallocator;
88
extern crate libc;
99
extern crate paste;
1010
extern crate test;
1111

12+
use jemalloc_sys::MALLOCX_ALIGN;
1213
use jemallocator::Jemalloc;
13-
use jemalloc_sys::MALLOCX_ALIGN;
1414
use libc::c_int;
1515
use std::{
1616
alloc::{Alloc, Excess, Layout},
@@ -55,7 +55,7 @@ macro_rules! rt {
5555
#[bench]
5656
fn [<rt_mallocx_size_ $size _align_ $align>](b: &mut Bencher) {
5757
b.iter(|| unsafe {
58-
use jemallocator::ffi as jemalloc;
58+
use jemalloc_sys as jemalloc;
5959
let flags = layout_to_flags(&Layout::from_size_align($size, $align).unwrap());
6060
let ptr = jemalloc::mallocx($size, flags);
6161
test::black_box(ptr);
@@ -66,7 +66,7 @@ macro_rules! rt {
6666
#[bench]
6767
fn [<rt_mallocx_nallocx_size_ $size _align_ $align>](b: &mut Bencher) {
6868
b.iter(|| unsafe {
69-
use jemallocator::ffi as jemalloc;
69+
use jemalloc_sys as jemalloc;
7070
let flags = layout_to_flags(&Layout::from_size_align($size, $align).unwrap());
7171
let ptr = jemalloc::mallocx($size, flags);
7272
test::black_box(ptr);
@@ -120,7 +120,7 @@ macro_rules! rt {
120120
#[bench]
121121
fn [<rt_mallocx_zeroed_size_ $size _align_ $align>](b: &mut Bencher) {
122122
b.iter(|| unsafe {
123-
use jemallocator::ffi as jemalloc;
123+
use jemalloc_sys as jemalloc;
124124
let flags = layout_to_flags(&Layout::from_size_align($size, $align).unwrap());
125125
let ptr = jemalloc::mallocx($size, flags | jemalloc::MALLOCX_ZERO);
126126
test::black_box(ptr);
@@ -131,7 +131,7 @@ macro_rules! rt {
131131
#[bench]
132132
fn [<rt_calloc_size_ $size _align_ $align>](b: &mut Bencher) {
133133
b.iter(|| unsafe {
134-
use jemallocator::ffi as jemalloc;
134+
use jemalloc_sys as jemalloc;
135135
let flags = layout_to_flags(&Layout::from_size_align($size, $align).unwrap());
136136
test::black_box(flags);
137137
let ptr = jemalloc::calloc(1, $size);

0 commit comments

Comments
 (0)