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 7979db9 commit b6cadb4Copy full SHA for b6cadb4
src/lib.rs
@@ -132,6 +132,10 @@ unsafe impl Alloc for Heap {
132
unsafe fn dealloc(&mut self, ptr: *mut u8, layout: Layout) {
133
self.deallocate(ptr, layout)
134
}
135
+
136
+ fn oom(&mut self, _: AllocErr) -> ! {
137
+ panic!("Out of memory");
138
+ }
139
140
141
pub struct LockedHeap(Mutex<Heap>);
@@ -171,6 +175,10 @@ unsafe impl<'a> Alloc for &'a LockedHeap {
171
175
172
176
self.0.lock().deallocate(ptr, layout)
173
177
178
179
180
181
174
182
183
184
/// Align downwards. Returns the greatest x with alignment `align`
0 commit comments