Skip to content

Commit

Permalink
Incorrect path in benchmarks
Browse files Browse the repository at this point in the history
  • Loading branch information
gnzlbg committed Mar 21, 2019
1 parent 801114a commit ac731c5
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions benches/roundtrip.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
#![feature(test, allocator_api)]
#![cfg(feature = "alloc_trait")]

extern crate jemallocator;
extern crate jemalloc_sys;
extern crate jemallocator;
extern crate libc;
extern crate paste;
extern crate test;

use jemalloc_sys::MALLOCX_ALIGN;
use jemallocator::Jemalloc;
use jemalloc_sys::MALLOCX_ALIGN;
use libc::c_int;
use std::{
alloc::{Alloc, Excess, Layout},
Expand Down Expand Up @@ -55,7 +55,7 @@ macro_rules! rt {
#[bench]
fn [<rt_mallocx_size_ $size _align_ $align>](b: &mut Bencher) {
b.iter(|| unsafe {
use jemallocator::ffi as jemalloc;
use jemalloc_sys as jemalloc;
let flags = layout_to_flags(&Layout::from_size_align($size, $align).unwrap());
let ptr = jemalloc::mallocx($size, flags);
test::black_box(ptr);
Expand All @@ -66,7 +66,7 @@ macro_rules! rt {
#[bench]
fn [<rt_mallocx_nallocx_size_ $size _align_ $align>](b: &mut Bencher) {
b.iter(|| unsafe {
use jemallocator::ffi as jemalloc;
use jemalloc_sys as jemalloc;
let flags = layout_to_flags(&Layout::from_size_align($size, $align).unwrap());
let ptr = jemalloc::mallocx($size, flags);
test::black_box(ptr);
Expand Down Expand Up @@ -120,7 +120,7 @@ macro_rules! rt {
#[bench]
fn [<rt_mallocx_zeroed_size_ $size _align_ $align>](b: &mut Bencher) {
b.iter(|| unsafe {
use jemallocator::ffi as jemalloc;
use jemalloc_sys as jemalloc;
let flags = layout_to_flags(&Layout::from_size_align($size, $align).unwrap());
let ptr = jemalloc::mallocx($size, flags | jemalloc::MALLOCX_ZERO);
test::black_box(ptr);
Expand All @@ -131,7 +131,7 @@ macro_rules! rt {
#[bench]
fn [<rt_calloc_size_ $size _align_ $align>](b: &mut Bencher) {
b.iter(|| unsafe {
use jemallocator::ffi as jemalloc;
use jemalloc_sys as jemalloc;
let flags = layout_to_flags(&Layout::from_size_align($size, $align).unwrap());
test::black_box(flags);
let ptr = jemalloc::calloc(1, $size);
Expand Down

0 comments on commit ac731c5

Please sign in to comment.