File tree Expand file tree Collapse file tree 4 files changed +8
-10
lines changed Expand file tree Collapse file tree 4 files changed +8
-10
lines changed Original file line number Diff line number Diff line change @@ -20,7 +20,6 @@ members = ["libmimalloc-sys" ]
2020travis-ci = { repository = " purpleprotocol/mimalloc_rust" }
2121
2222[dependencies ]
23- libc = " 0.2"
2423libmimalloc-sys = { path = " libmimalloc-sys" , version = " 0.1.10" }
2524
2625[features ]
Original file line number Diff line number Diff line change @@ -10,7 +10,6 @@ description = "Sys crate wrapping the mimalloc allocator"
1010license = " MIT"
1111
1212[dependencies ]
13- libc = " 0.2"
1413
1514[build-dependencies ]
1615cmake = " 0.1"
Original file line number Diff line number Diff line change 11// Copyright 2019 Octavian Oncescu
22
3- use libc :: { c_void, size_t } ;
3+ use core :: ffi :: c_void;
44
55extern "C" {
6- pub fn mi_zalloc ( size : size_t ) -> * const c_void ;
7- pub fn mi_malloc ( size : size_t ) -> * const c_void ;
8- pub fn mi_realloc ( p : * const c_void , size : size_t ) -> * const c_void ;
9- pub fn mi_zalloc_aligned ( size : size_t , alignment : size_t ) -> * const c_void ;
10- pub fn mi_malloc_aligned ( size : size_t , alignment : size_t ) -> * const c_void ;
11- pub fn mi_realloc_aligned ( p : * const c_void , size : size_t , alignment : size_t ) -> * const c_void ;
6+ pub fn mi_zalloc ( size : usize ) -> * const c_void ;
7+ pub fn mi_malloc ( size : usize ) -> * const c_void ;
8+ pub fn mi_realloc ( p : * const c_void , size : usize ) -> * const c_void ;
9+ pub fn mi_zalloc_aligned ( size : usize , alignment : usize ) -> * const c_void ;
10+ pub fn mi_malloc_aligned ( size : usize , alignment : usize ) -> * const c_void ;
11+ pub fn mi_realloc_aligned ( p : * const c_void , size : usize , alignment : usize ) -> * const c_void ;
1212 pub fn mi_free ( p : * const c_void ) -> c_void ;
1313}
1414
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ extern crate libmimalloc_sys as ffi;
2727
2828use core:: alloc:: { GlobalAlloc , Layout } ;
2929use ffi:: * ;
30- use libc :: c_void;
30+ use core :: ffi :: c_void;
3131
3232// Copied from https://github.com/rust-lang/rust/blob/master/src/libstd/sys_common/alloc.rs
3333#[ cfg( all( any(
You can’t perform that action at this time.
0 commit comments