new_wrapped


Description:

[ CCode ( has_construct_function = false , simple_generics = true ) ]
public static Memory new_wrapped<T> (MemoryFlags flags, uint8[] data, size_t offset, size_t size, owned T user_data)

Allocate a new memory block that wraps the given data.

The prefix/padding must be filled with 0 if flags contains ZERO_PREFIXED and ZERO_PADDED respectively.

Parameters:

flags

MemoryFlags

data

data to wrap

offset

offset in data

user_data

user_data

maxsize

allocated size of data

notify

called with user_data when the memory is freed

size

size of valid data

Returns:

a new Memory.