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.
used
free
1 parent 6c9060f commit dd70b4fCopy full SHA for dd70b4f
src/lib.rs
@@ -61,6 +61,26 @@ impl CortexMHeap {
61
.init(start_addr, size);
62
});
63
}
64
+
65
+ /// Returns an estimate of the amount of bytes in use.
66
+ pub fn used(&self) -> usize {
67
+ cortex_m::interrupt::free(|cs| {
68
+ self.heap
69
+ .borrow(cs)
70
+ .borrow_mut()
71
+ .used()
72
+ })
73
+ }
74
75
+ /// Returns an estimate of the amount of bytes available.
76
+ pub fn free(&self) -> usize {
77
78
79
80
81
+ .free()
82
83
84
85
86
unsafe impl GlobalAlloc for CortexMHeap {
0 commit comments