Expand description

default allocator management Features are:

  • windows:
    • no features: default implementation from servo heapsize crate
    • dlmalloc: default to estimate_size
    • jemalloc: default windows allocator is used instead
    • mimalloc: use mimallocator crate
  • arch x86:
    • no features: use default alloc
    • jemalloc: use tikv-jemallocator crate
    • dlmalloc: default to estimate_size
    • mimalloc: use mimallocator crate
  • arch x86/macos:
    • no features: use default alloc, requires using estimate_size
    • jemalloc: use tikv-jemallocator crate
    • dlmalloc: default to estimate_size
    • mimalloc: use mimallocator crate
  • arch wasm32:
    • no features: default to estimate_size
    • dlmalloc: default to estimate_size
    • jemalloc: compile error
    • mimalloc: compile error (until https://github.com/microsoft/mimalloc/pull/32 is merged)

Traits

Extension methods for MallocSizeOf trait, do not implement directly. It allows getting heapsize without exposing MallocSizeOfOps (a single default MallocSizeOfOps is used for each call).

Functions

Get a new instance of a MallocSizeOfOps