Skip to main content

vmaxget_unchecked

Function vmaxget_unchecked 

Source
unsafe extern "C-unwind" fn vmaxget_unchecked() -> *mut c_void
Expand description

Get the current R memory stack watermark.

Use with vmaxset() to restore memory stack state. Memory allocated with R_alloc() between vmaxget() and vmaxset() will be freed when vmaxset() is called.

§Example

unsafe {
    let watermark = vmaxget();
    let buf = R_alloc(100, 1);
    // ... use buf ...
    vmaxset(watermark); // frees buf
}

Unchecked FFI binding for vmaxget. Generated from source location line 3299, column 8. Generated from source file miniextendr-api/src/ffi.rs.