5 ms·
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 page
by kupfer 4y 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?
- sigi64 4y agoRust 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.