pub unsafe fn alloc_uninit(size: usize, align: usize) -> Option<AlignedBuf> {
        assert!(align > 0);
        assert!(ispower2(align));

        let sz = (size + align - 1) & !(align - 1);
        assert!(sz >= size);
        assert!(sz % align == 0);
        let p = heap::allocate(sz, align);

        if p.is_null() {
            None
        } else {
            Some(AlignedBuf { buf: p, len: sz, valid: 0, align: align })
        }
    }
/// Allocate some uninitialized memory. No bytes are valid as a
/// result of this. Returns `None` on allocation failure.
///
/// # Preconditions
/// `align` must be a power of 2, and greater than 0.
Allocate some uninitialized memory. No bytes are valid as a
result of this. Returns `None` on allocation failure.
Allocate some uninitialized memory . No bytes are valid as a result of this . Returns ` None ` on allocation failure .
pub unsafe fn alloc_uninit(size: usize, align: usize) -> Option<AlignedBuf> {
        assert!(align > 0);
        assert!(ispower2(align));
        let sz = (size + align - 1) & !(align - 1);
        assert!(sz >= size);
        assert!(sz % align == 0);
        let p = heap::allocate(sz, align);
        if p.is_null() {
            None
        } else {
            Some(AlignedBuf { buf: p, len: sz, valid: 0, align: align })
        }
    }
pub unsafe fn alloc_uninit ( size : usize , align : usize ) -> Option < AlignedBuf > { assert ! ( align 0 ) ; assert ! ( ispower2 ( align ) ) ; let sz = ( size + align - 1 ) & ! ( align - 1 ) ; assert ! ( sz size ) ; assert ! ( sz align 0 ) ; let p = heap :: allocate ( sz , align ) ; if p . is_null ( ) { None } else { Some ( AlignedBuf { buf : p , len : sz , valid : 0 , align : align } ) } }
Allocate some uninitialized memory.
Allocate some uninitialized memory .
size
usize
align
usize
size
usize
align
usize
preconditions
`align` must be a power of 2, and greater than 0.
` align ` must be a power of 2 and greater than 0 .