Class to allocate raw memory. It is used to store the data of Sequence and MultiArray. Malloc is faster than Ruby’s String because the memory is not cleared. Access is not safeguarded against memory violations and the memory size is unknown after constructing the object.
Constructor.
def Malloc.new( size )
Throws an exception because Malloc does not support marshalling.
def _dump
Return string with information about this object.
def inspect
Extract part of the data.
def mid( offset, length )
Overwrite part of the data.
def assign( offset, data )
Create an array class.
def Sequence( element_type, num_elements, stride = element_type.size )
Create a multi-dimensional array class.
def MultiArray( element_type, * shape )