gecko-dev/servo/components/malloc_size_of
Emilio Cobos Álvarez 149bb0ed03 Bug 1747349 - Remove ThinBoxedSlice. r=xidorn
The only remaining consumers are ::-moz-tree pseudo-elements (we used to
use ThinBoxedSlice for other data structures in the past).

Those are not particularly performance sensitive so I think just
double-boxing is fine. In the future, if we wanted to avoid the double
indirection, we could probably use the "thin" crate
(https://docs.rs/thin) or similar, which stores the length of the slice
along with the allocation, making the pointer thin in all
configurations, much like "ThinArc" does:

  https://searchfox.org/mozilla-central/rev/1ce2eea39442190a71a1f8f650d098f286bf4a01/servo/components/servo_arc/lib.rs#891

In practice though, I don't think it's particularly worth it for this
specific case.

Differential Revision: https://phabricator.services.mozilla.com/D134672
2021-12-25 06:25:35 +00:00
..
Cargo.toml Bug 1747349 - Remove ThinBoxedSlice. r=xidorn 2021-12-25 06:25:35 +00:00
lib.rs Bug 1747349 - Remove ThinBoxedSlice. r=xidorn 2021-12-25 06:25:35 +00:00
LICENSE-APACHE
LICENSE-MIT