mirror of
https://github.com/bspeice/qadapt
synced 2025-07-03 06:45:02 -04:00
Get version 0.4 ready
This commit is contained in:
@ -131,7 +131,7 @@ unsafe impl GlobalAlloc for QADAPT {
|
||||
}
|
||||
}
|
||||
|
||||
unsafe fn dealloc(&self, ptr: *mut u8, _layout: Layout) {
|
||||
unsafe fn dealloc(&self, ptr: *mut u8, layout: Layout) {
|
||||
if alloc_immediate() {
|
||||
return free(ptr as *mut c_void);
|
||||
}
|
||||
@ -148,13 +148,11 @@ unsafe impl GlobalAlloc for QADAPT {
|
||||
// Tripped a bad dealloc, but make sure further memory access during unwind
|
||||
// doesn't have issues
|
||||
PROTECTION_LEVEL.with(|v| *v.write() = 0);
|
||||
/*
|
||||
panic!(
|
||||
"Unexpected deallocation for size {}, protection level: {}",
|
||||
layout.size(),
|
||||
v
|
||||
)
|
||||
*/
|
||||
}
|
||||
_ => (),
|
||||
}
|
||||
|
Reference in New Issue
Block a user