Will the 4GB heap size limit ever be increased?

You probably want to divide by rts_memory_size() which is the number of Wasm memory bytes currently used by the canister (i.e. Wasm MemorySize instruction (Wasm page count) x 65536 (Wasm page size, in bytes)), currently limited by 4GiB since we are using 32-bit wasm.

Some more explanation is here:

1 Like