pub fn allocate_dynamic_object<T: Default>(&mut self, padding: usize) -> Option<&'heap mut T> {
        self.allocate(mem::size_of::<T>() + padding).map(|m| {
            let obj: &'heap mut T = unsafe { mem::transmute(m.inner().as_mut_ptr()) };
            *obj = T::default();
            obj
        })
    }
/// Request enough memory to hold an object of type `T` followed by
/// dynamic-sized padding. The object will be initialized to its default
/// value. Returns `None` if a block of memory that big isn't available.
Request enough memory to hold an object of type `T` followed by
dynamic-sized padding. The object will be initialized to its default
value. Returns `None` if a block of memory that big isn't available.
Request enough memory to hold an object of type ` T ` followed by dynamic - sized padding . The object will be initialized to its default value . Returns ` None ` if a block of memory that big isn ' t available .
pub fn allocate_dynamic_object<T: Default>(&mut self, padding: usize) -> Option<&'heap mut T> {
        self.allocate(mem::size_of::<T>() + padding).map(|m| {
            let obj: &'heap mut T = unsafe { mem::transmute(m.inner().as_mut_ptr()) };
            *obj = T::default();
            obj
        })
    }
pub fn allocate_dynamic_object < T : Default > ( & mut self , padding : usize ) -> Option < & ' heap mut T > { self . allocate ( mem :: size_of :: < T > ( ) + padding ) . map ( | m | { let obj : & ' heap mut T = unsafe { mem :: transmute ( m . inner ( ) . as_mut_ptr ( ) ) } ; * obj = T :: default ( ) ; obj } ) }
Request enough memory to hold an object of type `T` followed by
dynamic-sized padding.
Request enough memory to hold an object of type ` T ` followed by dynamic - sized padding .
&mut self
padding
usize
&mut self
padding
usize