≈ the.bay.news

How to create a fixed array on the heap?

The Rust Programming Language Forum
How to create a fixed array on the heap?
I've not used Rust much and I'm getting stuck a bit using the type Box<[u32;1024]>, I can't figure out how I'm supposed to directly allocate and zero initialise this without copying it from the stack or using a vector or something which feels wrong. I essentially just want the equivalent to: // let page: Box<[u32; 1024]> = ? uint32_t *page = calloc(sizeof(uint32_t), 1024);

0 comments

Sign in to join the discussion — your thebay.events account works here.

No comments yet.