- You can use rts_heap_size() to get used heap space
When you are talking about (stable var arrays), you should understand that variables declared as stable are still stored in heap memory. They are moved in and out of stable memory on upgrades. You should only care about stable memory if you are using the ExperimentalStableMemory feature. In this case, as far as I know, the only way is to track allocated space yourself. - You can upgrade subordinate canister from your main canister using
await (system YourActorClass)(#upgrade(yourActor))(yourActorArgs);
You can read more about this feature here Release 0.7.0 · dfinity/motoko · GitHub - IC Management canister is handy when you have a wasm blob to create your canister with, actor classes - when you can import your code
1 Like