This repository has been archived by the owner on Jul 10, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement a lower bound for Arc<T> and Rc<T>
This crate has always given a lower bound of the actual heap memory usage: we use `#[ignore_heap_size_of]` when not doing it is not practical. This fix #37 with one of the ideas given in the discussion there: return an accurate result when the reference count is 1 (and ownership is in fact not shared), or zero otherwise. However, since APIs to access reference counts are not `#[stable]` yet (see rust-lang/rust#28356), so always return zero when unstable APIs are not enabled.
- Loading branch information
1 parent
3b8141a
commit 50face8
Showing
2 changed files
with
43 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters