@@ -17,14 +17,31 @@ use libc::{c_int, c_void, size_t, c_char};
17
17
pub const MALLOCX_ZERO : c_int = 0x40 ;
18
18
19
19
extern "C" {
20
+ // Standard API
21
+ #[ link_name = "_rjem_malloc" ]
22
+ pub fn malloc ( size : size_t ) -> * mut c_void ;
23
+ #[ link_name = "_rjem_calloc" ]
24
+ pub fn calloc ( number : size_t , size : size_t ) -> * mut c_void ;
25
+ #[ link_name = "_rjem_posix_memalign" ]
26
+ pub fn posix_memalign ( ptr : * mut * mut c_void , alignment : size_t , size : size_t ) -> c_int ;
27
+ #[ link_name = "_rjem_aligned_alloc" ]
28
+ pub fn aligned_alloc ( alignment : size_t , size : size_t ) -> * mut c_void ;
29
+ #[ link_name = "_rjem_realloc" ]
30
+ pub fn realloc ( ptr : * mut c_void , size : size_t ) -> * mut c_void ;
31
+ #[ link_name = "_rjem_free" ]
32
+ pub fn free ( ptr : * mut c_void ) ;
33
+
34
+ // Non-standard API
20
35
#[ link_name = "_rjem_mallocx" ]
21
36
pub fn mallocx ( size : size_t , flags : c_int ) -> * mut c_void ;
22
- #[ link_name = "_rjem_calloc" ]
23
- pub fn calloc ( num : size_t , size : size_t ) -> * mut c_void ;
24
37
#[ link_name = "_rjem_rallocx" ]
25
38
pub fn rallocx ( ptr : * mut c_void , size : size_t , flags : c_int ) -> * mut c_void ;
26
39
#[ link_name = "_rjem_xallocx" ]
27
40
pub fn xallocx ( ptr : * mut c_void , size : size_t , extra : size_t , flags : c_int ) -> size_t ;
41
+ #[ link_name = "_rjem_sallocx" ]
42
+ pub fn sallocx ( ptr : * mut c_void , flags : c_int ) -> size_t ;
43
+ #[ link_name = "_rjem_dallocx" ]
44
+ pub fn dallocx ( ptr : * mut c_void , flags : c_int ) ;
28
45
#[ link_name = "_rjem_sdallocx" ]
29
46
pub fn sdallocx ( ptr : * mut c_void , size : size_t , flags : c_int ) ;
30
47
#[ link_name = "_rjem_nallocx" ]
0 commit comments