Hacker News new | ask | show | jobs
by HarHarVeryFunny 771 days ago
What's the utility of having a 128-bit pointer on a 64-bit system ?
1 comments

`Box<[u8]>` stores the pointer and its length (2 x size_t), `std::unique_ptr<const uint8_t[]>` only stores the pointer.

That's for slices, for dynamically sized types (eg. `Box<dyn ToString>`) it contains a pointer to the virtual table.

https://doc.rust-lang.org/nomicon/exotic-sizes.html