struct Uninit! { ... }
Sole ownership of one uninitialized heap block: its base address and its extent. Linear, and restricted to this module.
extent is the size in bytes most recently REQUESTED for the block -- not what the allocator actually reserved (malloc may round up), and not an alignment. alloc/try_alloc/grow/try_grow record it truthfully; adopt_raw cannot and records 0usize (see there).
Methods
method into_rawsource
fn into_raw(self) -> *u8 { ... }
Consumes the owner and hands back its address. Safe: the caller cannot turn the address back into an Uninit! except through adopt_raw, which is unsafe fn and carries the real obligation.
method into_partssource
fn into_parts(self) -> (*u8, usize) { ... }
into_raw, keeping the extent; alloc::owned::Allocation!::adopt records both. Safe for the same reason as into_raw; the extent is a plain number.