pub fn alloc(size: usize, align: usize) -> Option<AlignedBuf> {
        unsafe {
            match AlignedBuf::alloc_uninit(size, align) {
                None => None,
                Some(mut b) => {
                    ptr::write_bytes(b.buf, 0, b.len);
                    b.valid = b.len;
                    Some(b)
                }
            }
        }
    }
/// Allocate a buffer initialized to bytes.
Allocate a buffer initialized to bytes.
Allocate a buffer initialized to bytes .
pub fn alloc(size: usize, align: usize) -> Option<AlignedBuf> {
        unsafe {
            match AlignedBuf::alloc_uninit(size, align) {
                None => None,
                Some(mut b) => {
                    ptr::write_bytes(b.buf, 0, b.len);
                    b.valid = b.len;
                    Some(b)
                }
            }
        }
    }
pub fn alloc ( size : usize , align : usize ) -> Option < AlignedBuf > { unsafe { match AlignedBuf :: alloc_uninit ( size , align ) { None => None , Some ( mut b ) => { ptr :: write_bytes ( b . buf , 0 , b . len ) ; b . valid = b . len ; Some ( b ) } } } }
Allocate a buffer initialized to bytes.
Allocate a buffer initialized to bytes .
size
usize
align
usize
size
usize
align
usize