Hacker News new | ask | show | jobs
by kupfer 1322 days ago
I learned something, thanks. One of Chen's arguments is, that C allows better memory control compared to C++. For example, it's easy to place the vtable in pageable memory instead of non-pageable memory. Do you know if rust has this problem too, since it also uses vtables?
1 comments

Rust uses fat-pointers to references and raw pointers to dynamically sized types (DSTs) – slices or trait objects. A fat pointer contains a pointer plus some information that makes the DST "complete" (e.g. the length, or in the case of trait objects, the additional data is a pointer to the vtable).

Generally, you have, under control, where you store your fat-pointer.