use c_void;
use Once;
use vectorscan_rs_sys as hs;
unsafe extern "C"
static INIT_ALLOCATOR: Once = new;
/// Registers mimalloc as Vectorscan's internal allocator (macOS only).
///
/// Must be called before any Vectorscan `hs_scan_*` or `hs_alloc_scratch` calls so that
/// Vectorscan's internal allocations use the same allocator as the rest of the library.
/// Protected by a [`Once`] guard; safe to call multiple times — only the first call has
/// any effect.
///
/// Called automatically by [`crate::vectorscan::scanner::VectorscanScanner::new`].
///
/// # Panics
/// Panics if `hs_set_allocator` returns a non-success status, which would indicate a
/// Vectorscan API incompatibility.