baryl 0.0.4

Public SDK for Baryl, a full-system emulation and introspection engine
Documentation
/* automatically generated by rust-bindgen 0.72.1 */

pub const BARYL_ALLOC_ABI_VERSION: u32 = 4;
pub const BARYL_ALLOC_MIN_ABI_VERSION: u32 = 4;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct AllocRef {
    pub ctx: *mut ::core::ffi::c_void,
}
impl Default for AllocRef {
    fn default() -> Self {
        let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
#[repr(u32)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum AllocRegion {
    SbxRegion = 0,
    AnonRegion = 1,
}
unsafe extern "C" {
    pub fn baryl_leak_and_initialize(
        alloc: AllocRef,
        name: *const ::core::ffi::c_char,
        region: AllocRegion,
        size: u64,
        align: u64,
        init: ::core::option::Option<
            unsafe extern "C" fn(addr: u64, userdata: *mut ::core::ffi::c_void),
        >,
        userdata: *mut ::core::ffi::c_void,
    ) -> u64;
}
unsafe extern "C" {
    pub fn baryl_ck_heap_alloc(alloc: AllocRef, size: u64, align: u64) -> u64;
}
unsafe extern "C" {
    pub fn baryl_ck_heap_free(alloc: AllocRef, addr: u64, size: u64, align: u64);
}