Skip to content

Commit f519807

Browse files
committed
Added mimalloc ffi
1 parent 42da72b commit f519807

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ authors = ["Octavian Oncescu <[email protected]>"]
55
edition = "2018"
66

77
[dependencies]
8+
libc = "0.2"
89

910
[build-dependencies]
1011
cmake = "0.1"

src/ffi.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,7 @@
11
// Copyright 2019 Octavian Oncescu
2+
use libc::{c_void, size_t};
23

4+
extern "C" {
5+
fn mi_malloc_aligned(size: size_t, alignment: size_t) -> c_void;
6+
fn mi_free(p: *const c_void) -> c_void;
7+
}

0 commit comments

Comments
 (0)