You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 19, 2024. It is now read-only.
ic0.in_replicated_execution: () -> (result: i32); // * s
@@ -1944,6 +1945,26 @@ The argument `type` decides which performance counter to return:
1944
1945
1945
1946
In the future, the IC might expose more performance counters.
1946
1947
1948
+
### Canister limit {#system-api-canister-limit}
1949
+
1950
+
The canister can query one of the "canister limits", which denotes a resource limit of the canister imposed by the current configuration of the IC and/or canister. This allows runtime logic, such garbage collector or persistence mechanism, to adapt to the system limits without recompilation and redeployment.
1951
+
1952
+
`ic0.canister_limit : (limit_type : i32) -> i64`
1953
+
1954
+
The argument `limit_type` determines which resource limit to return:
1955
+
1956
+
- 0 : The [soft Wasm heap memory limit](https://internetcomputer.org/docs/current/developer-docs/smart-contracts/maintain/settings#wasm-memory-limit), or the IC-defined [hard Wasm memory limit](https://internetcomputer.org/docs/current/developer-docs/smart-contracts/maintain/resource-limits#resource-constraints-and-limits), whatever is smaller. The limit is specific to the canister, depending on the canister configuration (for the soft limit) and on whether it uses 32-bit or 64-bit Wasm memory.
1957
+
1958
+
- 1 : The [instruction limit per update message](https://internetcomputer.org/docs/current/developer-docs/smart-contracts/maintain/settings#wasm-memory-limit).
1959
+
1960
+
- 2 : The [instruction limit per upgrade message](https://internetcomputer.org/docs/current/developer-docs/smart-contracts/maintain/settings#wasm-memory-limit).
1961
+
1962
+
- 3 : The [maximum number of stable memory Wasm pages that can be accessed per update message](https://internetcomputer.org/docs/current/developer-docs/smart-contracts/maintain/settings#wasm-memory-limit).
1963
+
1964
+
- 4 : The [maximum number of stable memory Wasm pages that can be accessed per upgrade message](https://internetcomputer.org/docs/current/developer-docs/smart-contracts/maintain/settings#wasm-memory-limit).
1965
+
1966
+
In the future, this IC method might expose more canister limits.
0 commit comments