ic_cdk

Attribute Macro on_low_wasm_memory

Source
#[on_low_wasm_memory]
Expand description

Register the canister_on_low_wasm_memory entry point of a canister.

This attribute macro will export the function canister_on_low_wasm_memory in the canister module.

The function under this attribute must have no return value.

Each canister can only have one canister_on_low_wasm_memory entry point.

ยงExample

#[on_low_wasm_memory]
fn low_memory_handler() {
    // ...
}