Understanding the basic idea of uninitialized memory
โ Rust ๐ 2025-09-16 ๐ค surdeus ๐๏ธ 10Reading this only OoC, since I know 0 about the lower levels or hardware.
But I did wonder, can the idea be represented as a single diagram? Or maybe simplified a bit for beginners?
One seems clear:
let a:u8;
Can not be read in safe Rust. It can in unsafe Rust, I think? And either way, it does not contains random bit pattern.
It seems one needs to imagine a Rust AM rather than hardware. A separate model where bytes have a 2nd state of "unitialized" but after going through I am still unsure what to imagine in its place.
It is like an extra abstraction on top of a raw byte contents ? Because, I dont think imagining actually uninitialized memory makes sense, since it will always be something.
8 posts - 5 participants
๐ท๏ธ Rust_feed