1#![no_std]
2
3extern crate libc;
4
5unsafe extern "C" {
6 pub fn TCMallocInternalAlignedAlloc(
12 align: libc::size_t,
13 size: libc::size_t,
14 ) -> *mut libc::c_void;
15
16 pub fn TCMallocInternalFreeAlignedSized(
22 ptr: *mut libc::c_void,
23 align: libc::size_t,
24 size: libc::size_t,
25 );
26}
27
28#[cfg(test)]
29mod tests {
30 use super::*;
31
32 #[test]
33 fn it_frees_memory_malloc() {
34 let ptr = unsafe { TCMallocInternalAlignedAlloc(8, 8) } as *mut u8;
35 unsafe { TCMallocInternalFreeAlignedSized(ptr as *mut libc::c_void, 8, 8) };
36 }
37}