1#![no_std]
2
3#[cfg(feature = "extension")]
4mod extension;
5
6#[cfg(feature = "extension")]
7pub use extension::*;
8
9unsafe extern "C" {
10 pub fn TCMallocInternalAlignedAlloc(
16 align: libc::size_t,
17 size: libc::size_t,
18 ) -> *mut core::ffi::c_void;
19
20 pub fn TCMallocInternalFreeAlignedSized(
26 ptr: *mut core::ffi::c_void,
27 align: libc::size_t,
28 size: libc::size_t,
29 );
30}
31
32#[cfg(test)]
33mod tests {
34 use super::*;
35
36 #[test]
37 fn it_frees_memory_malloc() {
38 let ptr = unsafe { TCMallocInternalAlignedAlloc(8, 8) } as *mut u8;
39 unsafe { TCMallocInternalFreeAlignedSized(ptr as *mut libc::c_void, 8, 8) };
40 }
41}