File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1094,11 +1094,12 @@ extern "C" {
10941094
10951095#[ cfg( test) ]
10961096mod tests {
1097+ use super :: super :: mi_malloc;
10971098 use super :: * ;
10981099
10991100 #[ test]
11001101 fn it_calculates_usable_size ( ) {
1101- let ptr = unsafe { crate :: mi_malloc ( 32 ) } as * mut u8 ;
1102+ let ptr = unsafe { mi_malloc ( 32 ) } as * mut u8 ;
11021103 let usable_size = unsafe { mi_usable_size ( ptr as * mut c_void ) } ;
11031104 assert ! (
11041105 usable_size >= 32 ,
Original file line number Diff line number Diff line change @@ -55,5 +55,11 @@ fn main() {
5555 }
5656 } ) ;
5757
58+ if version == "v3" {
59+ cfg. header ( "mimalloc-stats.h" ) . include ( format ! (
60+ "{cargo_manifest_dir}/../c_src/mimalloc/{version}/include"
61+ ) ) ;
62+ }
63+
5864 cfg. generate ( "../src/lib.rs" , "all.rs" ) ;
5965}
Original file line number Diff line number Diff line change 2020//! own benchmarks.
2121//!
2222//! To enable secure mode, put in `Cargo.toml`:
23- //! ```rust,ignore
23+ //! ```toml
2424//! [dependencies]
2525//! mimalloc = { version = "*", features = ["secure"] }
2626//! ```
You can’t perform that action at this time.
0 commit comments