sm_static

Function sm_static 

Source
pub fn sm_static(enable: bool)
Expand description

Orphaned buffer detection can be disabled (for such items as buffers allocated during initialisation) by calling sm_static(true). Normal orphaned buffer detection can be re-enabled with sm_static(false). Note that all the other safeguards still apply to buffers allocated when sm_static(true) mode is in effect.

Examples found in repository?
examples/native.rs (line 7)
6fn main() {
7    sm_static(true); // disable from here
8    let size = 50 * 1024 * 1024;
9    let mut x: Vec<usize> = Vec::new();
10    for i in 0..size {
11        x.push(i);
12    }
13    println!("{:?}", x.iter().sum::<usize>());
14    sm_static(false); // enable from here
15    sm_dump(true); // doesn't track anything after is enabled
16}