pub unsafe fn from_array(ptr: *mut T, len: usize) -> Malloc<[T]> {
        // Even a 0-size slice cannot be null, so just use another pointer
        let ptr = if ptr.is_null() && len == 0 { DUMMY_PTR as *mut T }
                  else { ptr };
        let slice = slice::from_raw_parts(ptr, len);
        Malloc { ptr: slice as *const [T] as *mut [T] }
    }
/**
    Constructs a new `Malloc` for a `malloc`'d buffer with the given length
    at the given pointer.

    Unsafe because there must be `len` contiguous, valid instances of `T`
    at `ptr`.

    The given pointer must not be null unless the length is 0; this function
    will specially handle null, 0-length buffers safely.
    */
Constructs a new `Malloc` for a `malloc`'d buffer with the given length
at the given pointer.



The given pointer must not be null unless the length is 0; this function
will specially handle null, 0-length buffers safely.
Constructs a new ` Malloc ` for a ` malloc ` ' d buffer with the given length at the given pointer . The given pointer must not be null unless the length is 0 ; this function will specially handle null 0 - length buffers safely .
pub unsafe fn from_array(ptr: *mut T, len: usize) -> Malloc<[T]> {
        // Even a 0-size slice cannot be null, so just use another pointer
        let ptr = if ptr.is_null() && len == 0 { DUMMY_PTR as *mut T }
                  else { ptr };
        let slice = slice::from_raw_parts(ptr, len);
        Malloc { ptr: slice as *const [T] as *mut [T] }
    }
pub unsafe fn from_array ( ptr : * mut T , len : usize ) -> Malloc < [ T ] > { // Even a 0-size slice cannot be null, so just use another pointer let ptr = if ptr . is_null ( ) && len == 0 { DUMMY_PTR as * mut T } else { ptr } ; let slice = slice :: from_raw_parts ( ptr , len ) ; Malloc { ptr : slice as * const [ T ] as * mut [ T ] } }
Constructs a new `Malloc` for a `malloc`'d buffer with the given length
at the given pointer.
Constructs a new ` Malloc ` for a ` malloc ` ' d buffer with the given length at the given pointer .
ptr
*mut T
len
usize