chore(deps): refresh hotpath, mimalloc, and kafka (#7135)

* chore(deps): refresh hotpath and mimalloc

Co-Authored-By: heihutu <heihutu@gmail.com>

Co-Authored-By: zhi22915 <qiuzgang@gmail.com>

* chore(deps): bump rustfs kafka crates

Co-Authored-By: heihutu <heihutu@gmail.com>

Co-Authored-By: zhi22915 <qiuzgang@gmail.com>

---------

Co-authored-by: zhi22915 <qiuzgang@gmail.com>
This commit is contained in:
houseme
2026-09-04 20:10:16 +08:00
committed by GitHub
parent 507447da12
commit da28f8c843
3 changed files with 57 additions and 82 deletions
+6 -2
View File
@@ -14,6 +14,8 @@
#[cfg(all(feature = "hotpath", feature = "hotpath-alloc", not(target_os = "windows")))]
use std::alloc::{GlobalAlloc, Layout};
#[cfg(all(feature = "hotpath", feature = "hotpath-alloc", not(target_os = "windows")))]
use std::ptr::NonNull;
#[cfg(all(feature = "hotpath", feature = "hotpath-alloc", not(target_os = "windows")))]
#[derive(Default)]
@@ -35,8 +37,10 @@ unsafe impl GlobalAlloc for MiMallocAllocator {
}
unsafe fn dealloc(&self, ptr: *mut u8, layout: Layout) {
// SAFETY: ptr came from this allocator and layout.size() is the original allocation size.
unsafe { rustfs_mimalloc::MiMalloc::free_csize(ptr, layout.size()) }
// SAFETY: ptr came from this allocator, is non-null by GlobalAlloc's
// dealloc contract, and layout.size() is the original allocation size.
let ptr = unsafe { NonNull::new_unchecked(ptr) };
unsafe { rustfs_mimalloc::MiMalloc::free_csize_nonnull(ptr, layout.size()) }
}
unsafe fn realloc(&self, ptr: *mut u8, layout: Layout, new_size: usize) -> *mut u8 {