/// Extend a buffer to `size` bytes, leaving the added storage
/// uninitialized. Returns false if the allocation fails. `size`
/// is rounded up to the alignment.
Extend a buffer to `size` bytes, leaving the added storage
uninitialized. Returns false if the allocation fails. `size`
is rounded up to the alignment.
Extend a buffer to ` size ` bytes leaving the added storage uninitialized . Returns false if the allocation fails . ` size ` is rounded up to the alignment .
pub unsafe fn extend_uninit(&mut self, size: usize) -> bool {
        let sz = (size + self.align - 1) & (self.align - 1);
        assert!(sz >= self.len);
        if sz == self.len {
            return true;
        }
        let p = realloc(self.buf, self.len, sz, self.align);
        if p.is_null() {
            return false;
        }
        self.buf = p;
        self.len = sz;
        true
    }
pub unsafe fn extend_uninit ( & mut self , size : usize ) -> bool { let sz = ( size + self . align - 1 ) & ( self . align - 1 ) ; assert ! ( sz self len ) ; if sz == self . len { return true ; } let p = realloc ( self . buf , self . len , sz , self . align ) ; if p . is_null ( ) { return false ; } self . buf = p ; self . len = sz ; true }
Extend a buffer to `size` bytes, leaving the added storage
uninitialized.
Extend a buffer to ` size ` bytes leaving the added storage uninitialized .
&mut self
size
usize