Function simics_api_sys::frags_extract_slice_alloc

source ยท
pub unsafe extern "C" fn frags_extract_slice_alloc(
    buf: *const frags_t,
    offset: usize,
    len: usize,
) -> *mut c_void
Expand description
return a partial copy of the contents of a frags_t

Return an allocated copy of a slice of size len, starting at offset offset, of the contents of

buf. The return value is allocated with MM_MALLOC(), and its ownership is passed to the caller, which should free it when appropriate.

This function is equivalent to allocating a buffer of the correct size with MM_MALLOC() followed by a call to frags_extract_slice(), and is provided for convenience.

A newly allocated, partial copy of the data Cell Context frags_extract, frags_extract_slice, frags_extract_alloc