/// Returns the total memory taken by canisters in bytes.
///
/// This accounts for the canister memory reservation, where specified; and
/// the actual canister memory usage, where no explicit memory reservation
/// has been made.
Returns the total memory taken by canisters in bytes.
This accounts for the canister memory reservation, where specified; and
the actual canister memory usage, where no explicit memory reservation
has been made.
Returns the total memory taken by canisters in bytes . This accounts for the canister memory reservation where specified ; and the actual canister memory usage where no explicit memory reservation has been made .
pub fn total_memory_taken(&self) -> NumBytes {
        let mut memory_taken = self
            .canisters_iter()
            .map(|canister| match canister.memory_allocation() {
                MemoryAllocation::Reserved(bytes) => bytes,
                MemoryAllocation::BestEffort => {
                    canister.memory_usage(self.metadata.own_subnet_type)
                }
            })
            .sum();
        if ENFORCE_MESSAGE_MEMORY_USAGE && self.metadata.own_subnet_type != SubnetType::System {
            memory_taken += (self.subnet_queues.memory_usage() as u64).into();
        }
        memory_taken
    }
pub fn total_memory_taken ( & self ) -> NumBytes { let mut memory_taken = self . canisters_iter ( ) . map ( | canister | match canister . memory_allocation ( ) { MemoryAllocation :: Reserved ( bytes ) => bytes , MemoryAllocation :: BestEffort => { canister . memory_usage ( self . metadata . own_subnet_type ) } } ) . sum ( ) ; if ENFORCE_MESSAGE_MEMORY_USAGE && self . metadata . own_subnet_type != SubnetType :: System { memory_taken += ( self . subnet_queues . memory_usage ( ) as u64 ) . into ( ) ; } memory_taken }
Returns the total memory taken by canisters in bytes.
Returns the total memory taken by canisters in bytes .
&self