mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Servo currently uses `heapsize`, but Stylo/Gecko use `malloc_size_of`. `malloc_size_of` is better -- it handles various cases that `heapsize` does not -- so this patch changes Servo to use `malloc_size_of`. This patch makes the following changes to the `malloc_size_of` crate. - Adds `MallocSizeOf` trait implementations for numerous types, some built-in (e.g. `VecDeque`), some external and Servo-only (e.g. `string_cache`). - Makes `enclosing_size_of_op` optional, because vanilla jemalloc doesn't support that operation. - For `HashSet`/`HashMap`, falls back to a computed estimate when `enclosing_size_of_op` isn't available. - Adds an extern "C" `malloc_size_of` function that does the actual heap measurement; this is based on the same functions from the `heapsize` crate. This patch makes the following changes elsewhere. - Converts all the uses of `heapsize` to instead use `malloc_size_of`. - Disables the "heapsize"/"heap_size" feature for the external crates that provide it. - Removes the `HeapSizeOf` implementation from `hashglobe`. - Adds `ignore` annotations to a few `Rc`/`Arc`, because `malloc_size_of` doesn't derive those types, unlike `heapsize`.
50 lines
1.3 KiB
TOML
50 lines
1.3 KiB
TOML
[package]
|
|
name = "layout_thread"
|
|
version = "0.0.1"
|
|
authors = ["The Servo Project Developers"]
|
|
license = "MPL-2.0"
|
|
publish = false
|
|
|
|
[lib]
|
|
name = "layout_thread"
|
|
path = "lib.rs"
|
|
|
|
[features]
|
|
unstable = ["parking_lot/nightly", "nonzero/unstable"]
|
|
|
|
[dependencies]
|
|
app_units = "0.5"
|
|
atomic_refcell = "0.1"
|
|
euclid = "0.15"
|
|
fnv = "1.0"
|
|
gfx = {path = "../gfx"}
|
|
gfx_traits = {path = "../gfx_traits"}
|
|
html5ever = "0.20.0"
|
|
ipc-channel = "0.9"
|
|
layout = {path = "../layout"}
|
|
layout_traits = {path = "../layout_traits"}
|
|
lazy_static = "0.2"
|
|
libc = "0.2"
|
|
log = "0.3.5"
|
|
malloc_size_of = { path = "../malloc_size_of" }
|
|
metrics = {path = "../metrics"}
|
|
msg = {path = "../msg"}
|
|
net_traits = {path = "../net_traits"}
|
|
nonzero = {path = "../nonzero"}
|
|
parking_lot = "0.4"
|
|
profile_traits = {path = "../profile_traits"}
|
|
range = {path = "../range"}
|
|
rayon = "0.8"
|
|
script = {path = "../script"}
|
|
script_layout_interface = {path = "../script_layout_interface"}
|
|
script_traits = {path = "../script_traits"}
|
|
selectors = { path = "../selectors" }
|
|
serde_json = "1.0"
|
|
servo_arc = {path = "../servo_arc"}
|
|
servo_atoms = {path = "../atoms"}
|
|
servo_config = {path = "../config"}
|
|
servo_geometry = {path = "../geometry"}
|
|
servo_url = {path = "../url"}
|
|
style = {path = "../style"}
|
|
style_traits = {path = "../style_traits"}
|
|
webrender_api = {git = "https://github.com/servo/webrender", features = ["ipc"]}
|