Is it possible to alloc vec![0_u32; 4096 * 4096 * 32]

I am using:

            other: vec![0_u32; 4096 * 4096 * 32],

which is resulting in a "capacity overflow"

However, I'm pretty sure I have 2GB lying around (out of the 4GB wasm32 has).

Question: is there anyway to allocate this 2GB block of u_32 in Rust/wasm32 ?

The maximum allocation is isize::MAX, so on a 32-bit target, there is no way.

3 Likes