# Easiest way to know when canister size gets to certain size

**URL:** https://forum.dfinity.org/t/easiest-way-to-know-when-canister-size-gets-to-certain-size/13838
**Category:** Getting Started
**Created:** [June 16, 2022, 11:41am UTC](https://forum.dfinity.org/t/easiest-way-to-know-when-canister-size-gets-to-certain-size/13838 "2022-06-16T11:41:27Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![domwoe](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/domwoe/32/5165_2.png) [@domwoe](https://forum.dfinity.org/u/domwoe)
#### Post date: [June 16, 2022, 12:05pm UTC](https://forum.dfinity.org/t/easiest-way-to-know-when-canister-size-gets-to-certain-size/13838/2 "2022-06-16T12:05:29Z")

</div>

In Motoko you can use `Prim.rts_memory_size()` and in Rust it seems to be [memory\_size in core::arch::wasm32 - Rust](https://doc.rust-lang.org/core/arch/wasm32/fn.memory_size.html) .

Have a look at this thread for more details: [Motoko, Array, Memory](https://forum.dfinity.org/t/motoko-array-memory/5324)

This repo does this in Rust:

> **[GitHub - GLicDEV/quickstart\_scaling: This is a study on IC scalability of...](https://github.com/GLicDEV/quickstart_scaling)**
>
> This is a study on IC scalability of smart contracts using rust - GitHub - GLicDEV/quickstart\_scaling: This is a study on IC scalability of smart contracts using rust

and there might be other examples in the following thread: [ICDevs.org Bounty #20 - QuickStart Dapp - Scaling With Canisters - 200 ICP, 100 ICP, 50 ICP - Multiple winners](https://forum.dfinity.org/t/icdevs-org-bounty-20-quickstart-dapp-scaling-with-canisters-200-icp-100-icp-50-icp-multiple-winners/11756)

---

_[View the full topic](https://forum.dfinity.org/t/easiest-way-to-know-when-canister-size-gets-to-certain-size/13838)._
