Aeledfyr / deepsize

A rust crate to find the total size of an object, on the stack and on the heap
MIT License
103 stars 19 forks source link

Does it work for more magical types like [`ndarray`](https://docs.rs/ndarray/0.15.3/ndarray/), which seems to use raw pointers? #29

Open fzyzcjy opened 2 years ago

fzyzcjy commented 2 years ago

For example, an Array2<u8> indeed uses https://docs.rs/ndarray/0.15.4/src/ndarray/data_repr.rs.html#21-25 which is:

pub struct OwnedRepr<A> {
    ptr: NonNull<A>,
    len: usize,
    capacity: usize,
}

For example, it can be as big as 10MB, but can deepsize recognize it?