We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 281054d commit e69ba9bCopy full SHA for e69ba9b
1 file changed
src/tlsf.rs
@@ -101,7 +101,8 @@ impl Heap {
101
/// Get the amount of bytes used by the allocator.
102
pub fn used(&self) -> usize {
103
critical_section::with(|cs| {
104
- self.heap.borrow_ref_mut(cs).raw_block_size - self.free_with_cs(cs)
+ let free = self.free_with_cs(cs);
105
+ self.heap.borrow_ref_mut(cs).raw_block_size - free
106
})
107
}
108
0 commit comments