File tree 4 files changed +8
-10
lines changed
4 files changed +8
-10
lines changed Original file line number Diff line number Diff line change @@ -20,7 +20,6 @@ members = ["libmimalloc-sys" ]
20
20
travis-ci = { repository = " purpleprotocol/mimalloc_rust" }
21
21
22
22
[dependencies ]
23
- libc = " 0.2"
24
23
libmimalloc-sys = { path = " libmimalloc-sys" , version = " 0.1.10" }
25
24
26
25
[features ]
Original file line number Diff line number Diff line change @@ -10,7 +10,6 @@ description = "Sys crate wrapping the mimalloc allocator"
10
10
license = " MIT"
11
11
12
12
[dependencies ]
13
- libc = " 0.2"
14
13
15
14
[build-dependencies ]
16
15
cmake = " 0.1"
Original file line number Diff line number Diff line change 1
1
// Copyright 2019 Octavian Oncescu
2
2
3
- use libc :: { c_void, size_t } ;
3
+ use core :: ffi :: c_void;
4
4
5
5
extern "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 ;
12
12
pub fn mi_free ( p : * const c_void ) -> c_void ;
13
13
}
14
14
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ extern crate libmimalloc_sys as ffi;
27
27
28
28
use core:: alloc:: { GlobalAlloc , Layout } ;
29
29
use ffi:: * ;
30
- use libc :: c_void;
30
+ use core :: ffi :: c_void;
31
31
32
32
// Copied from https://github.com/rust-lang/rust/blob/master/src/libstd/sys_common/alloc.rs
33
33
#[ cfg( all( any(
You can’t perform that action at this time.
0 commit comments