class MachInfo::MachArrayPtrConvertor(T)
- MachInfo::MachArrayPtrConvertor(T)
- Reference
- Object
Overview
Pointer Helper Class This class performs some memory management for out array pointers. The convertor ensures we dont leak kernel memory, but copying the array to our own pointer, and calling vm_deallocate back on the orignal pointer, yes this is a copy and used more ram than needed, but it ensures vm alocated memory is properly freed.
Defined in:
mach/types.crClass Method Summary
-
.cast_to(ptr : LibC::ArrayPtr)
cast routine will ensure the passed in pointer is de-allocated and a copy made for the return value
- .cast_to_array(ptr : LibC::ArrayPtr, length : Int = 0)
Class Method Detail
def self.cast_to(ptr : LibC::ArrayPtr)
#
cast routine will ensure the passed in pointer is de-allocated and a copy made for the return value