Skip to main content

obkrnl/uma/
bucket.rs

1/// Implementation of `uma_bucket` structure.
2///
3/// # Safety
4/// Adding more fields into this struct without knowing how it work can cause undefined behavior in
5/// some places.
6#[repr(C)]
7pub struct UmaBucket {
8    pub hdr: BucketHdr,
9    pub items: [*mut u8], // ub_bucket
10}
11
12/// Header of [UmaBucket].
13#[repr(C)]
14pub struct BucketHdr {
15    pub len: usize, // ub_cnt
16}