servo/components/script
Nicholas Nethercote 4506f0d30c Replace all uses of the heapsize crate with malloc_size_of.
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`.
2017-10-18 22:20:37 +11:00
..
docs Rename Root<T> to DomRoot<T> 2017-09-26 09:49:10 +02:00
dom Replace all uses of the heapsize crate with malloc_size_of. 2017-10-18 22:20:37 +11:00
task_source Remove use of unstable box syntax. 2017-10-16 17:16:20 +02:00
body.rs Replace all uses of the heapsize crate with malloc_size_of. 2017-10-18 22:20:37 +11:00
build.rs order derivable traits lists 2017-08-23 21:38:44 +02:00
Cargo.toml Replace all uses of the heapsize crate with malloc_size_of. 2017-10-18 22:20:37 +11:00
clipboard_provider.rs make use of ScriptToConstellationChan 2017-08-15 08:22:09 +02:00
CMakeLists.txt Fix doc build by resurrecting generation of supported DOM APIs.h 2016-09-24 15:06:06 -04:00
devtools.rs Rename Root<T> to DomRoot<T> 2017-09-26 09:49:10 +02:00
document_loader.rs Replace all uses of the heapsize crate with malloc_size_of. 2017-10-18 22:20:37 +11:00
fetch.rs Remove use of unstable box syntax. 2017-10-16 17:16:20 +02:00
layout_image.rs Remove use of unstable box syntax. 2017-10-16 17:16:20 +02:00
lib.rs Replace all uses of the heapsize crate with malloc_size_of. 2017-10-18 22:20:37 +11:00
mem.rs Replace all uses of the heapsize crate with malloc_size_of. 2017-10-18 22:20:37 +11:00
microtask.rs Replace all uses of the heapsize crate with malloc_size_of. 2017-10-18 22:20:37 +11:00
network_listener.rs Introduce TaskOnce 2017-09-20 10:37:09 +02:00
script_runtime.rs Move script_runtime::StackRootTLS to root::ThreadLocalStackRoots 2017-09-27 13:58:59 +02:00
script_thread.rs Replace all uses of the heapsize crate with malloc_size_of. 2017-10-18 22:20:37 +11:00
serviceworker_manager.rs remove extra spaces after keywords 2017-07-20 00:45:02 +03:00
serviceworkerjob.rs Rename DOMRefCell<T> to DomRefCell<T> 2017-09-26 09:49:08 +02:00
stylesheet_loader.rs Remove use of unstable box syntax. 2017-10-16 17:16:20 +02:00
task.rs Make usage of core_intrinsics optional 2017-10-16 20:20:21 +02:00
test.rs Parse srcset attribute 2017-10-03 13:18:01 +02:00
textinput.rs Replace all uses of the heapsize crate with malloc_size_of. 2017-10-18 22:20:37 +11:00
timers.rs Replace all uses of the heapsize crate with malloc_size_of. 2017-10-18 22:20:37 +11:00
unpremultiplytable.rs
webdriver_handlers.rs Rename Root<T> to DomRoot<T> 2017-09-26 09:49:10 +02:00