Skip to content

Commit e4d5153

Browse files
committed
Add READMEs to individual crates
Signed-off-by: Nico Burns <[email protected]>
1 parent aee67ac commit e4d5153

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

malloc_size_of/README.md

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# MallocSizeOf
2+
3+
[![Build Status](https://github.com/servo/malloc_size_of/actions/workflows/main.yml/badge.svg)](https://github.com/servo/malloc_size_of/actions)
4+
[![Crates.io](https://img.shields.io/crates/v/malloc_size_of.svg)](https://crates.io/crates/malloc_size_of)
5+
[![Docs](https://docs.rs/malloc_size_of/badge.svg)](https://docs.rs/malloc_size_of)
6+
![Crates.io License](https://img.shields.io/crates/l/malloc_size_of)
7+
[![dependency status](https://deps.rs/repo/github/servo/malloc_size_of/status.svg)](https://deps.rs/repo/github/servo/malloc_size_of)
8+
9+
A an allocator-agnostic crate for measuring the runtime size of a value
10+
including the size of any heap allocations that are owned by that value.
11+
12+
This crate is used by both Servo and Firefox for memory usage calculation.
13+
14+
## Features
15+
16+
- It isn't bound to a particular heap allocator.
17+
- It provides traits for both "shallow" and "deep" measurement, which gives
18+
flexibility in the cases where the traits can't be used.
19+
- It allows for measuring blocks even when only an interior pointer can be
20+
obtained for heap allocations, e.g. `HashSet` and `HashMap`. (This relies
21+
on the heap allocator having suitable support, which `jemalloc` has.)
22+
- It allows handling of types like `Rc` and `Arc` by providing traits that
23+
are different to the ones for non-graph structures.

malloc_size_of_derive/README.md

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# MallocSizeOfDerive
2+
3+
A derive macro for the `MallocSizeOf` trait from the [malloc_size_of](https://crates.io/crates/malloc_size_of) crate.

0 commit comments

Comments
 (0)