1
0
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:
2018-11-15 20:16:49 -05:00
parent 398b1395a0
commit 8b4ebe8c88
7 changed files with 53 additions and 26 deletions

View File

@ -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
)
*/
}
_ => (),
}