33#![ feature( test, allocator_api) ]
44#![ cfg( feature = "alloc_trait" ) ]
55
6- extern crate jemallocator;
76extern crate jemalloc_sys;
7+ extern crate jemallocator;
88extern crate libc;
99extern crate paste;
1010extern crate test;
1111
12+ use jemalloc_sys:: MALLOCX_ALIGN ;
1213use jemallocator:: Jemalloc ;
13- use jemalloc_sys:: MALLOCX_ALIGN ;
1414use libc:: c_int;
1515use 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