Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion docs/references/ic-interface-spec/abstract-behavior.md
Original file line number Diff line number Diff line change
Expand Up @@ -1245,14 +1245,15 @@ Conditions
S.messages = Older_messages · FuncMessage M · Younger_messages
(M.queue = Unordered) or (∀ CallMessage M' | FuncMessage M' ∈ Older_messages. M'.queue ≠ M.queue)
(∀ FuncMessage M' ∈ Older_messages · Younger_messages. M'.receiver ≠ M.receiver or M.entry_point ≠ OnLowWasmMemory)
S.on_low_wasm_memory_hook_status[M.receiver] ≠ Ready
S.canisters[M.receiver] ≠ EmptyCanister
Mod = S.canisters[M.receiver].module
Ctxt = S.call_contexts[M.call_context]
Deadline = deadline_of_context(Ctxt)

Is_response = M.entry_point == Callback _ _ _
Comment thread
mraszyk marked this conversation as resolved.

S.on_low_wasm_memory_hook_status[M.receiver] ≠ Ready or Is_response

Env = {
time = S.time[M.receiver];
controllers = S.controllers[M.receiver];
Expand Down
4 changes: 3 additions & 1 deletion docs/references/ic-interface-spec/canister-interface.md
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,9 @@ The threshold `t` can be defined in the field `wasm_memory_threshold` in the [ca
:::note

While the above function is scheduled immediately once the condition above is triggered, it may not necessarily be executed immediately if the canister does not have enough cycles.
If the canister gets frozen immediately after the function is scheduled for execution, the function will run once the canister's unfrozen _if_ the canister's remaining wasm memory size in bytes remains strictly less than the threshold `t`.
If the canister gets frozen immediately after the function is scheduled for execution, the function will run once the canister is unfrozen _if_ the canister's remaining wasm memory size in bytes remains strictly less than the threshold `t`.
In particular, inter-canister response callback messages might still be executed after the condition is triggered and before the function `canister_on_low_wasm_memory` is executed.

:::

#### Callbacks
Expand Down
Loading