public abstract class AbstractMemory extends MemoryObject
RubyObject.Data
RubyBasicObject.Finalizer
Modifier and Type | Field and Description |
---|---|
static String |
ABSTRACT_MEMORY_RUBY_CLASS |
protected long |
size
The total size of the memory area
|
protected int |
typeSize
The size of each element of this memory area - e.g.
|
FIELD_ALLOCATED_CLASSES, FIELD_ALLOCATORS, IVAR_INSPECTING_OBJECT_ALLOCATOR, OBJECT_ALLOCATOR, OBJECT_VAR0_ALLOCATOR, OBJECT_VAR1_ALLOCATOR, OBJECT_VAR2_ALLOCATOR, OBJECT_VAR3_ALLOCATOR, OBJECT_VAR4_ALLOCATOR, OBJECT_VAR5_ALLOCATOR, OBJECT_VAR6_ALLOCATOR, OBJECT_VAR7_ALLOCATOR, OBJECT_VAR8_ALLOCATOR, OBJECT_VAR9_ALLOCATOR, REIFYING_OBJECT_ALLOCATOR
ALL_F, BASICOBJECT_ALLOCATOR, COMPARE_BY_IDENTITY_F, ERR_INSECURE_SET_INST_VAR, FALSE_F, FL_USHIFT, flags, FROZEN_F, IS_OVERLAID_F, metaClass, NEVER, NIL_F, REFINED_MODULE_F, STAMP_OFFSET, TAINTED_F, UNDEF, UNTRUST_F, USER0_F, USER1_F, USER2_F, USER3_F, USER4_F, USER5_F, USER6_F, USER7_F, USER8_F, USER9_F, USERA_F, VAR_TABLE_OFFSET, varTable, varTableStamp
NULL_ARRAY
Modifier | Constructor and Description |
---|---|
protected |
AbstractMemory(Ruby runtime,
RubyClass klass,
MemoryIO io,
long size) |
protected |
AbstractMemory(Ruby runtime,
RubyClass klass,
MemoryIO io,
long size,
int typeSize) |
Modifier and Type | Method and Description |
---|---|
protected MemoryIO |
allocateMemoryIO() |
IRubyObject |
aref(ThreadContext context,
IRubyObject indexArg) |
protected static int |
calculateTypeSize(ThreadContext context,
IRubyObject sizeArg) |
protected static RubyArray |
checkArray(IRubyObject obj) |
IRubyObject |
clear(ThreadContext context)
Clears (zeros out) the memory contents.
|
static RubyClass |
createAbstractMemoryClass(Ruby runtime,
RubyModule module) |
boolean |
equals(Object obj)
Compares this MemoryPointer to another MemoryPointer.
|
IRubyObject |
get_array_of_float(ThreadContext context,
IRubyObject offset,
IRubyObject length)
Reads an array of signed 32 bit floating point values from the memory address.
|
IRubyObject |
get_array_of_float64(ThreadContext context,
IRubyObject offset,
IRubyObject length)
Reads an array of signed 64 bit floating point values from the memory address.
|
IRubyObject |
get_array_of_int16(ThreadContext context,
IRubyObject offset,
IRubyObject length)
Reads an array of signed 16 bit integer values from the memory address.
|
IRubyObject |
get_array_of_int32(ThreadContext context,
IRubyObject offset,
IRubyObject length)
Reads an array of signed 32 bit integer values from the memory address.
|
IRubyObject |
get_array_of_int64(ThreadContext context,
IRubyObject offset,
IRubyObject length)
Reads an array of signed 64 bit integer values from the memory address.
|
IRubyObject |
get_array_of_int8(ThreadContext context,
IRubyObject offset,
IRubyObject length)
Reads an array of signed 8 bit integer values from the memory address.
|
IRubyObject |
get_array_of_long(ThreadContext context,
IRubyObject offset,
IRubyObject length)
Reads an array of signed long integer values from the memory address.
|
IRubyObject |
get_array_of_pointer(ThreadContext context,
IRubyObject offset,
IRubyObject length) |
IRubyObject |
get_array_of_string(ThreadContext context,
IRubyObject rbOffset) |
IRubyObject |
get_array_of_string(ThreadContext context,
IRubyObject rbOffset,
IRubyObject rbCount) |
IRubyObject |
get_array_of_uint16(ThreadContext context,
IRubyObject offset,
IRubyObject length)
Reads an array of unsigned 16 bit integer values from the memory address.
|
IRubyObject |
get_array_of_uint32(ThreadContext context,
IRubyObject offset,
IRubyObject length)
Reads an array of unsigned 32 bit integer values from the memory address.
|
IRubyObject |
get_array_of_uint64(ThreadContext context,
IRubyObject offset,
IRubyObject length)
Reads an array of unsigned 64 bit integer values from the memory address.
|
IRubyObject |
get_array_of_uint8(ThreadContext context,
IRubyObject offset,
IRubyObject length)
Reads an array of unsigned 8 bit integer values from the memory address.
|
IRubyObject |
get_array_of_ulong(ThreadContext context,
IRubyObject offset,
IRubyObject length)
Reads an array of unsigned long integer values from the memory address.
|
IRubyObject |
get_bytes(ThreadContext context,
IRubyObject offArg,
IRubyObject lenArg) |
IRubyObject |
get_float32(ThreadContext context)
Reads a 32 bit floating point value from the memory address.
|
IRubyObject |
get_float32(ThreadContext context,
IRubyObject offset)
Reads a 32 bit floating point value from the memory address.
|
IRubyObject |
get_float64(ThreadContext context)
Reads a 64 bit floating point value from the memory address.
|
IRubyObject |
get_float64(ThreadContext context,
IRubyObject offset)
Reads a 64 bit floating point value from the memory address.
|
IRubyObject |
get_int16(ThreadContext context)
Reads a 16 bit signed integer value from the memory address.
|
IRubyObject |
get_int16(ThreadContext context,
IRubyObject offset)
Reads a 16 bit signed integer value from the memory address.
|
IRubyObject |
get_int32(ThreadContext context)
Reads a 32 bit signed integer value from the memory address.
|
IRubyObject |
get_int32(ThreadContext context,
IRubyObject offset)
Reads a 32 bit signed integer value from the memory address.
|
IRubyObject |
get_int64(ThreadContext context)
Reads a 64 bit integer value from the memory address.
|
IRubyObject |
get_int64(ThreadContext context,
IRubyObject offset)
Reads a 64 bit integer value from the memory address.
|
IRubyObject |
get_int8(ThreadContext context)
Reads an 8 bit signed integer value from the memory address.
|
IRubyObject |
get_int8(ThreadContext context,
IRubyObject offset)
Reads an 8 bit signed integer value from the memory address.
|
IRubyObject |
get_long(ThreadContext context)
Reads a C long integer value from the memory area.
|
IRubyObject |
get_long(ThreadContext context,
IRubyObject offset)
Reads a C long integer value from the memory area.
|
IRubyObject |
get_pointer(ThreadContext context) |
IRubyObject |
get_pointer(ThreadContext context,
IRubyObject offset) |
IRubyObject |
get_string(ThreadContext context) |
IRubyObject |
get_string(ThreadContext context,
IRubyObject offArg) |
IRubyObject |
get_string(ThreadContext context,
IRubyObject offArg,
IRubyObject lenArg) |
IRubyObject |
get_uint16(ThreadContext context)
Reads a 16 bit unsigned integer value from the memory address.
|
IRubyObject |
get_uint16(ThreadContext context,
IRubyObject offset)
Reads a 16 bit unsigned integer value from the memory address.
|
IRubyObject |
get_uint32(ThreadContext context)
Reads a 32 bit unsigned integer value from the memory address.
|
IRubyObject |
get_uint32(ThreadContext context,
IRubyObject offset)
Reads a 32 bit unsigned integer value from the memory address.
|
IRubyObject |
get_uint64(ThreadContext context)
Reads a 64 bit unsigned integer value from the memory address.
|
IRubyObject |
get_uint64(ThreadContext context,
IRubyObject offset)
Reads a 64 bit unsigned integer value from the memory address.
|
IRubyObject |
get_uint8(ThreadContext context)
Reads an 8 bit unsigned integer value from the memory address.
|
IRubyObject |
get_uint8(ThreadContext context,
IRubyObject offset)
Reads an 8 bit unsigned integer value from the memory address.
|
IRubyObject |
get_ulong(ThreadContext context)
Reads a C unsigned long integer value from the memory area.
|
IRubyObject |
get_ulong(ThreadContext context,
IRubyObject offset)
Reads a C unsigned long integer value from the memory area.
|
protected long |
getOffset(IRubyObject offset)
Calculates the absolute offset within the base memory pointer for a given offset.
|
protected abstract Pointer |
getPointer(Ruby runtime,
long offset) |
long |
getSize()
Gets the size of the memory area.
|
RubyFixnum |
hash(ThreadContext context)
Calculates a hash code for the pointer.
|
int |
hashCode()
Calculates the hash code for this MemoryPointer
|
IRubyObject |
op_equal(ThreadContext context,
IRubyObject obj) |
IRubyObject |
op_plus(ThreadContext context,
IRubyObject value) |
abstract AbstractMemory |
order(Ruby runtime,
ByteOrder order) |
IRubyObject |
order(ThreadContext context) |
IRubyObject |
order(ThreadContext context,
IRubyObject byte_order) |
IRubyObject |
put_array_of_float(ThreadContext context,
IRubyObject offset,
IRubyObject arrParam)
Writes an array of 32 bit floating point values to the memory area.
|
IRubyObject |
put_array_of_float64(ThreadContext context,
IRubyObject offset,
IRubyObject arrParam)
Writes an array of 64 bit floating point values to the memory area.
|
IRubyObject |
put_array_of_int16(ThreadContext context,
IRubyObject offset,
IRubyObject arrParam)
Writes an array of signed 16 bit integer values to the memory area.
|
IRubyObject |
put_array_of_int32(ThreadContext context,
IRubyObject offset,
IRubyObject arrParam)
Writes an array of signed 32 bit integer values to the memory area.
|
IRubyObject |
put_array_of_int64(ThreadContext context,
IRubyObject offset,
IRubyObject arrParam)
Writes an array of signed 64 bit integer values to the memory area.
|
IRubyObject |
put_array_of_int8(ThreadContext context,
IRubyObject offset,
IRubyObject arrParam)
Writes an array of signed 8 bit integer values to the memory area.
|
IRubyObject |
put_array_of_long(ThreadContext context,
IRubyObject offset,
IRubyObject arr)
Writes an array of signed long integer values to the memory area.
|
IRubyObject |
put_array_of_pointer(ThreadContext context,
IRubyObject offset,
IRubyObject arrParam) |
IRubyObject |
put_array_of_uint16(ThreadContext context,
IRubyObject offset,
IRubyObject arrParam)
Writes an array of unsigned 16 bit integer values to the memory area.
|
IRubyObject |
put_array_of_uint32(ThreadContext context,
IRubyObject offset,
IRubyObject arrParam)
Writes an array of unsigned 32 bit integer values to the memory area.
|
IRubyObject |
put_array_of_uint64(ThreadContext context,
IRubyObject offset,
IRubyObject arrParam)
Writes an array of unsigned 64 bit integer values to the memory area.
|
IRubyObject |
put_array_of_uint8(ThreadContext context,
IRubyObject offset,
IRubyObject arrParam)
Writes an array of unsigned 8 bit integer values to the memory area.
|
IRubyObject |
put_array_of_ulong(ThreadContext context,
IRubyObject offset,
IRubyObject arr)
Writes an array of unsigned long integer values to the memory area.
|
IRubyObject |
put_bytes(ThreadContext context,
IRubyObject[] args) |
IRubyObject |
put_callback(ThreadContext context,
IRubyObject offset,
IRubyObject proc,
IRubyObject cbInfo) |
IRubyObject |
put_float32(ThreadContext context,
IRubyObject value)
Writes an 32 bit floating point value to the memory area.
|
IRubyObject |
put_float32(ThreadContext context,
IRubyObject offset,
IRubyObject value)
Writes an 32 bit floating point value to the memory area.
|
IRubyObject |
put_float64(ThreadContext context,
IRubyObject value)
Writes an 64 bit floating point value to the memory area.
|
IRubyObject |
put_float64(ThreadContext context,
IRubyObject offset,
IRubyObject value)
Writes an 64 bit floating point value to the memory area.
|
IRubyObject |
put_int16(ThreadContext context,
IRubyObject value)
Writes a 16 bit signed integer value to the memory address.
|
IRubyObject |
put_int16(ThreadContext context,
IRubyObject offset,
IRubyObject value)
Writes a 16 bit signed integer value to the memory address.
|
IRubyObject |
put_int32(ThreadContext context,
IRubyObject value)
Writes a 32 bit signed integer value to the memory address.
|
IRubyObject |
put_int32(ThreadContext context,
IRubyObject offset,
IRubyObject value)
Writes a 32 bit signed integer value to the memory address.
|
IRubyObject |
put_int64(ThreadContext context,
IRubyObject value)
Writes a 64 bit integer value to the memory area.
|
IRubyObject |
put_int64(ThreadContext context,
IRubyObject offset,
IRubyObject value)
Writes a 64 bit integer value to the memory area.
|
IRubyObject |
put_int8(ThreadContext context,
IRubyObject value)
Writes a 8 bit signed integer value to the memory area.
|
IRubyObject |
put_int8(ThreadContext context,
IRubyObject offset,
IRubyObject value)
Writes a 8 bit signed integer value to the memory area.
|
IRubyObject |
put_long(ThreadContext context,
IRubyObject value)
Writes a C long integer value to the memory area.
|
IRubyObject |
put_long(ThreadContext context,
IRubyObject offset,
IRubyObject value)
Writes a C long integer value to the memory area.
|
IRubyObject |
put_pointer(ThreadContext context,
IRubyObject value) |
IRubyObject |
put_pointer(ThreadContext context,
IRubyObject offset,
IRubyObject value) |
IRubyObject |
put_string(ThreadContext context,
IRubyObject offArg,
IRubyObject strArg) |
IRubyObject |
put_uint16(ThreadContext context,
IRubyObject value)
Writes a 16 bit unsigned integer value to the memory address.
|
IRubyObject |
put_uint16(ThreadContext context,
IRubyObject offset,
IRubyObject value)
Writes a 16 bit unsigned integer value to the memory address.
|
IRubyObject |
put_uint32(ThreadContext context,
IRubyObject value)
Writes an 32 bit unsigned integer value to the memory address.
|
IRubyObject |
put_uint32(ThreadContext context,
IRubyObject offset,
IRubyObject value)
Writes an 32 bit unsigned integer value to the memory address.
|
IRubyObject |
put_uint64(ThreadContext context,
IRubyObject value)
Writes a 64 bit unsigned integer value to the memory area.
|
IRubyObject |
put_uint64(ThreadContext context,
IRubyObject offset,
IRubyObject value)
Writes a 64 bit unsigned integer value to the memory area.
|
IRubyObject |
put_uint8(ThreadContext context,
IRubyObject value)
Writes a 8 bit unsigned integer value to the memory area.
|
IRubyObject |
put_uint8(ThreadContext context,
IRubyObject offset,
IRubyObject value)
Writes a 8 bit unsigned integer value to the memory area.
|
IRubyObject |
put_ulong(ThreadContext context,
IRubyObject value)
Writes a C long integer value to the memory area.
|
IRubyObject |
put_ulong(ThreadContext context,
IRubyObject offset,
IRubyObject value)
Writes a C long integer value to the memory area.
|
IRubyObject |
read_array_of_float(ThreadContext context,
IRubyObject length)
Reads an array of signed 32 bit floating point values from the memory address.
|
IRubyObject |
read_array_of_float64(ThreadContext context,
IRubyObject length)
Reads an array of signed 64 bit floating point values from the memory address.
|
IRubyObject |
read_array_of_int16(ThreadContext context,
IRubyObject length)
Reads an array of signed 16 bit integer values from the memory address.
|
IRubyObject |
read_array_of_int32(ThreadContext context,
IRubyObject length)
Reads an array of signed 32 bit integer values from the memory address.
|
IRubyObject |
read_array_of_int64(ThreadContext context,
IRubyObject length)
Reads an array of signed 64 bit integer values from the memory address.
|
IRubyObject |
read_array_of_int8(ThreadContext context,
IRubyObject length)
Reads an array of signed 8 bit integer values from the memory address.
|
IRubyObject |
read_array_of_long(ThreadContext context,
IRubyObject length)
Reads an array of signed long integer values from the memory address.
|
IRubyObject |
read_array_of_pointer(ThreadContext context,
IRubyObject length) |
IRubyObject |
read_array_of_string(ThreadContext context) |
IRubyObject |
read_array_of_string(ThreadContext context,
IRubyObject rbLength) |
IRubyObject |
read_array_of_type(ThreadContext context,
IRubyObject typeArg,
IRubyObject lenArg) |
IRubyObject |
read_array_of_type(ThreadContext context,
IRubyObject typeArg,
IRubyObject reader,
IRubyObject lenArg) |
IRubyObject |
read_array_of_uint16(ThreadContext context,
IRubyObject length)
Reads an array of unsigned 16 bit integer values from the memory address.
|
IRubyObject |
read_array_of_uint32(ThreadContext context,
IRubyObject length)
Reads an array of unsigned 32 bit integer values from the memory address.
|
IRubyObject |
read_array_of_uint64(ThreadContext context,
IRubyObject length)
Reads an array of unsigned 64 bit integer values from the memory address.
|
IRubyObject |
read_array_of_uint8(ThreadContext context,
IRubyObject length)
Reads an array of unsigned 8 bit integer values from the memory address.
|
IRubyObject |
read_array_of_ulong(ThreadContext context,
IRubyObject length)
Reads an array of unsigned long integer values from the memory address.
|
IRubyObject |
read_bytes(ThreadContext context,
IRubyObject lenArg) |
IRubyObject |
read_char(ThreadContext context)
Reads an 8 bit signed integer value from the memory address.
|
IRubyObject |
read_double(ThreadContext context)
Reads a 64 bit floating point value from the memory address.
|
IRubyObject |
read_float(ThreadContext context)
Reads a 32 bit floating point value from the memory address.
|
IRubyObject |
read_int(ThreadContext context)
Reads a 32 bit signed integer value from the memory address.
|
IRubyObject |
read_long_long(ThreadContext context)
Reads a 64 bit integer value from the memory address.
|
IRubyObject |
read_long(ThreadContext context)
Reads a C long integer value from the memory area.
|
IRubyObject |
read_pointer(ThreadContext context) |
IRubyObject |
read_short(ThreadContext context)
Reads a 16 bit signed integer value from the memory address.
|
IRubyObject |
read_string(ThreadContext context) |
IRubyObject |
read_string(ThreadContext context,
IRubyObject rbLength) |
IRubyObject |
read_uchar(ThreadContext context)
Reads an 8 bit unsigned integer value from the memory address.
|
IRubyObject |
read_uint(ThreadContext context)
Reads a 32 bit unsigned integer value from the memory address.
|
IRubyObject |
read_ulong_long(ThreadContext context)
Reads a 64 bit unsigned integer value from the memory address.
|
IRubyObject |
read_ulong(ThreadContext context)
Reads a C unsigned long integer value from the memory area.
|
IRubyObject |
read_ushort(ThreadContext context)
Reads a 16 bit unsigned integer value from the memory address.
|
protected abstract AbstractMemory |
slice(Ruby runtime,
long offset) |
protected abstract AbstractMemory |
slice(Ruby runtime,
long offset,
long size) |
IRubyObject |
slice(ThreadContext context,
IRubyObject offset,
IRubyObject size) |
IRubyObject |
to_ptr(ThreadContext context) |
IRubyObject |
to_s(ThreadContext context,
IRubyObject[] args) |
IRubyObject |
total(ThreadContext context)
Gets the total size (in bytes) of the Memory.
|
IRubyObject |
type_size(ThreadContext context)
Indicates how many bytes the intrinsic type of the memory uses.
|
IRubyObject |
write_array_of_float(ThreadContext context,
IRubyObject ary)
Writes an array of 32 bit floating point values to the memory area.
|
IRubyObject |
write_array_of_float64(ThreadContext context,
IRubyObject ary)
Writes an array of 64 bit floating point values to the memory area.
|
IRubyObject |
write_array_of_int16(ThreadContext context,
IRubyObject ary)
Writes an array of signed 16 bit integer values to the memory area.
|
IRubyObject |
write_array_of_int32(ThreadContext context,
IRubyObject ary)
Writes an array of signed 32 bit integer values to the memory area.
|
IRubyObject |
write_array_of_int64(ThreadContext context,
IRubyObject ary)
Writes an array of signed 64 bit integer values to the memory area.
|
IRubyObject |
write_array_of_int8(ThreadContext context,
IRubyObject ary)
Writes an array of signed 8 bit integer values to the memory area.
|
IRubyObject |
write_array_of_long(ThreadContext context,
IRubyObject ary)
Writes an array of signed long integer values to the memory area.
|
IRubyObject |
write_array_of_pointer(ThreadContext context,
IRubyObject arrParam) |
IRubyObject |
write_array_of_type(ThreadContext context,
IRubyObject typeArg,
IRubyObject aryArg) |
IRubyObject |
write_array_of_type(ThreadContext context,
IRubyObject typeArg,
IRubyObject writer,
IRubyObject aryArg) |
IRubyObject |
write_array_of_uint16(ThreadContext context,
IRubyObject ary)
Writes an array of unsigned 16 bit integer values to the memory area.
|
IRubyObject |
write_array_of_uint32(ThreadContext context,
IRubyObject ary)
Writes an array of unsigned 32 bit integer values to the memory area.
|
IRubyObject |
write_array_of_uint64(ThreadContext context,
IRubyObject ary)
Writes an array of unsigned 64 bit integer values to the memory area.
|
IRubyObject |
write_array_of_uint8(ThreadContext context,
IRubyObject ary)
Writes an array of unsigned 8 bit integer values to the memory area.
|
IRubyObject |
write_array_of_ulong(ThreadContext context,
IRubyObject ary)
Writes an array of unsigned long integer values to the memory area.
|
IRubyObject |
write_bytes(ThreadContext context,
IRubyObject[] args) |
IRubyObject |
write_char(ThreadContext context,
IRubyObject value)
Writes a 8 bit signed integer value to the memory area.
|
IRubyObject |
write_double(ThreadContext context,
IRubyObject value)
Writes an 64 bit floating point value to the memory area.
|
IRubyObject |
write_float(ThreadContext context,
IRubyObject value)
Writes an 32 bit floating point value to the memory area.
|
IRubyObject |
write_int(ThreadContext context,
IRubyObject value)
Writes a 32 bit signed integer value to the memory address.
|
IRubyObject |
write_long_long(ThreadContext context,
IRubyObject value)
Writes a 64 bit integer value to the memory area.
|
IRubyObject |
write_long(ThreadContext context,
IRubyObject value)
Writes a C long integer value to the memory area.
|
IRubyObject |
write_pointer(ThreadContext context,
IRubyObject value) |
IRubyObject |
write_short(ThreadContext context,
IRubyObject value)
Writes a 16 bit signed integer value to the memory address.
|
IRubyObject |
write_string(ThreadContext context,
IRubyObject strArg) |
IRubyObject |
write_string(ThreadContext context,
IRubyObject strArg,
IRubyObject lenArg) |
IRubyObject |
write_uchar(ThreadContext context,
IRubyObject value)
Writes a 8 bit unsigned integer value to the memory area.
|
IRubyObject |
write_uint(ThreadContext context,
IRubyObject value)
Writes an 32 bit unsigned integer value to the memory address.
|
IRubyObject |
write_ulong_long(ThreadContext context,
IRubyObject value)
Writes a 64 bit unsigned integer value to the memory area.
|
IRubyObject |
write_ushort(ThreadContext context,
IRubyObject value)
Writes a 16 bit unsigned integer value to the memory address.
|
getMemoryIO, setMemoryIO
attachToObjectSpace, callInit, callInit, callInit, callInit, callInit, callInit, callInit, callInit, callInit, callInit, convertToType, createObjectClass, eqlInternal, equalInternal, getNativeClassIndex, initialize, initialize, inspect, op_eqq, puts, specificEval, toString
addFinalizer, anyToString, asJavaString, asString, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callSuper, checkArrayType, checkCallMethod, checkFrozen, checkStringType, checkStringType19, compareTo, convertToArray, convertToFloat, convertToHash, convertToInteger, convertToInteger, convertToInteger, convertToString, copyInstanceVariablesInto, copySpecialInstanceVariables, createBasicObjectClass, dataGetStruct, dataGetStructChecked, dataWrapStruct, display, dup, ensureInstanceVariablesSettable, eql_p, eql, equal_p, equal_p19, evalUnder, extend, fastGetInstanceVariable, fastGetInternalVariable, fastHasInstanceVariable, fastHasInternalVariable, fastSetInstanceVariable, fastSetInternalVariable, freeze, frozen_p, getFFIHandle, getFlag, getInstanceEvalClass, getInstanceVariable, getInstanceVariableList, getInstanceVariableNameList, getInstanceVariables, getInternalVariable, getInternalVariables, getJavaClass, getMetaClass, getNativeHandle, getNativeTypeIndex, getObjectId, getRuntime, getSingletonClass, getSingletonClassClone, getType, getVariable, getVariableCount, getVariableList, getVariableNameList, hash, hashyInspect, hasInstanceVariable, hasInternalVariable, hasVariables, id, infectBy, initialize_copy, initialize19, inspect, inspectHashCode, instance_eval, instance_eval, instance_eval, instance_eval, instance_eval19, instance_eval19, instance_eval19, instance_eval19, instance_exec, instance_exec19, instance_of_p, instance_variable_defined_p, instance_variable_get, instance_variable_set, instance_variables, instance_variables19, isBuiltin, isClass, isFalse, isFrozen, isImmediate, isModule, isNil, isSpecialConst, isTaint, isTrue, isUntrusted, kind_of_p, makeMetaClass, method_missing19, method, method19, methods, methods, methods19, nil_p, OBJ_INIT_COPY, objInitCopy, op_cmp, op_equal_19, op_match, op_match19, op_not_equal, op_not_match, op_not, private_methods, private_methods19, protected_methods, protected_methods19, public_methods, public_methods19, rbClone, rbInspect, remove_instance_variable, removeFinalizers, removeInstanceVariable, removeInternalVariable, respond_to_p, respond_to_p, respond_to_p19, respond_to_p19, respondsTo, respondsToMissing, respondsToMissing, send, send, send, send, send, send19, send19, send19, send19, setFFIHandle, setFlag, setFrozen, setInstanceVariable, setInternalVariable, setMetaClass, setNativeHandle, setTaint, setUntrusted, setVariable, singleton_method_added19, singleton_method_removed19, singleton_method_undefined19, singleton_methods, specificEval, specificEval, specificEval, specificEval, syncVariables, syncVariables, taint, taint, tainted_p, testFrozen, testFrozen, to_a, to_s, toJava, trust, type_deprecated, type, untaint, untrust, untrusted_p, validateInstanceVariable, variableTableContains, variableTableFastContains, variableTableFastFetch, variableTableFastStore, variableTableFetch, variableTableRemove, variableTableStore, variableTableSync, yieldUnder, yieldUnder
public static final String ABSTRACT_MEMORY_RUBY_CLASS
protected long size
protected int typeSize
public static RubyClass createAbstractMemoryClass(Ruby runtime, RubyModule module)
protected static final int calculateTypeSize(ThreadContext context, IRubyObject sizeArg)
protected static final RubyArray checkArray(IRubyObject obj)
protected MemoryIO allocateMemoryIO()
allocateMemoryIO
in class MemoryObject
protected final long getOffset(IRubyObject offset)
offset
- The offset to add to the base offset.public final long getSize()
public RubyFixnum hash(ThreadContext context)
public IRubyObject to_s(ThreadContext context, IRubyObject[] args)
public final IRubyObject aref(ThreadContext context, IRubyObject indexArg)
public boolean equals(Object obj)
equals
in class RubyObject
obj
- The other MemoryPointer to compare to.public IRubyObject op_equal(ThreadContext context, IRubyObject obj)
op_equal
in interface IRubyObject
op_equal
in class RubyBasicObject
public int hashCode()
hashCode
in class RubyObject
public IRubyObject clear(ThreadContext context)
public IRubyObject total(ThreadContext context)
public final IRubyObject type_size(ThreadContext context)
context
- public IRubyObject write_char(ThreadContext context, IRubyObject value)
value
- The value to write.public IRubyObject put_int8(ThreadContext context, IRubyObject value)
value
- The value to write.public IRubyObject put_int8(ThreadContext context, IRubyObject offset, IRubyObject value)
offset
- The offset from the base pointer address to write the value.value
- The value to write.public IRubyObject read_char(ThreadContext context)
public IRubyObject get_int8(ThreadContext context)
public IRubyObject get_int8(ThreadContext context, IRubyObject offset)
offset
- The offset from the base pointer address to read the value.public IRubyObject write_uchar(ThreadContext context, IRubyObject value)
value
- The value to write.public IRubyObject put_uint8(ThreadContext context, IRubyObject value)
value
- The value to write.public IRubyObject put_uint8(ThreadContext context, IRubyObject offset, IRubyObject value)
offset
- The offset from the base pointer address to write the value.value
- The value to write.public IRubyObject read_uchar(ThreadContext context)
public IRubyObject get_uint8(ThreadContext context)
public IRubyObject get_uint8(ThreadContext context, IRubyObject offset)
offset
- The offset from the base pointer address to read the value.public IRubyObject write_short(ThreadContext context, IRubyObject value)
value
- The value to write.public IRubyObject put_int16(ThreadContext context, IRubyObject value)
value
- The value to write.public IRubyObject put_int16(ThreadContext context, IRubyObject offset, IRubyObject value)
offset
- The offset from the base pointer address to write the value.value
- The value to write.public IRubyObject read_short(ThreadContext context)
public IRubyObject get_int16(ThreadContext context)
public IRubyObject get_int16(ThreadContext context, IRubyObject offset)
offset
- The offset from the base pointer address to read the value.public IRubyObject write_ushort(ThreadContext context, IRubyObject value)
value
- The value to write.public IRubyObject put_uint16(ThreadContext context, IRubyObject value)
value
- The value to write.public IRubyObject put_uint16(ThreadContext context, IRubyObject offset, IRubyObject value)
offset
- The offset from the base pointer address to write the value.value
- The value to write.public IRubyObject read_ushort(ThreadContext context)
public IRubyObject get_uint16(ThreadContext context)
public IRubyObject get_uint16(ThreadContext context, IRubyObject offset)
offset
- The offset from the base pointer address to read the value.public IRubyObject write_int(ThreadContext context, IRubyObject value)
value
- The value to write.public IRubyObject put_int32(ThreadContext context, IRubyObject value)
value
- The value to write.public IRubyObject put_int32(ThreadContext context, IRubyObject offset, IRubyObject value)
offset
- The offset from the base pointer address to write the value.value
- The value to write.public IRubyObject read_int(ThreadContext context)
public IRubyObject get_int32(ThreadContext context)
public IRubyObject get_int32(ThreadContext context, IRubyObject offset)
offset
- The offset from the base pointer address to read the value.public IRubyObject write_uint(ThreadContext context, IRubyObject value)
value
- The value to write.public IRubyObject put_uint32(ThreadContext context, IRubyObject value)
value
- The value to write.public IRubyObject put_uint32(ThreadContext context, IRubyObject offset, IRubyObject value)
offset
- The offset from the base pointer address to write the value.value
- The value to write.public IRubyObject read_uint(ThreadContext context)
public IRubyObject get_uint32(ThreadContext context)
public IRubyObject get_uint32(ThreadContext context, IRubyObject offset)
offset
- The offset from the base pointer address to read the value.public IRubyObject write_long_long(ThreadContext context, IRubyObject value)
value
- The value to write.public IRubyObject put_int64(ThreadContext context, IRubyObject value)
value
- The value to write.public IRubyObject put_int64(ThreadContext context, IRubyObject offset, IRubyObject value)
offset
- The offset from the base pointer address to write the value.value
- The value to write.public IRubyObject read_long_long(ThreadContext context)
public IRubyObject get_int64(ThreadContext context)
public IRubyObject get_int64(ThreadContext context, IRubyObject offset)
offset
- The offset from the base pointer address to read the value.public IRubyObject write_ulong_long(ThreadContext context, IRubyObject value)
value
- The value to write.public IRubyObject put_uint64(ThreadContext context, IRubyObject value)
value
- The value to write.public IRubyObject put_uint64(ThreadContext context, IRubyObject offset, IRubyObject value)
offset
- The offset from the base pointer address to write the value.value
- The value to write.public IRubyObject read_ulong_long(ThreadContext context)
public IRubyObject get_uint64(ThreadContext context)
public IRubyObject get_uint64(ThreadContext context, IRubyObject offset)
offset
- The offset from the base pointer address to read the value.public IRubyObject write_long(ThreadContext context, IRubyObject value)
value
- The value to write.public IRubyObject put_long(ThreadContext context, IRubyObject value)
value
- The value to write.public IRubyObject put_long(ThreadContext context, IRubyObject offset, IRubyObject value)
offset
- The offset from the base pointer address to write the value.value
- The value to write.public IRubyObject read_long(ThreadContext context)
public IRubyObject get_long(ThreadContext context)
public IRubyObject get_long(ThreadContext context, IRubyObject offset)
offset
- The offset from the base pointer address to read the value.public IRubyObject put_ulong(ThreadContext context, IRubyObject value)
value
- The value to write.public IRubyObject put_ulong(ThreadContext context, IRubyObject offset, IRubyObject value)
offset
- The offset from the base pointer address to write the value.value
- The value to write.public IRubyObject read_ulong(ThreadContext context)
public IRubyObject get_ulong(ThreadContext context)
public IRubyObject get_ulong(ThreadContext context, IRubyObject offset)
offset
- The offset from the base pointer address to read the value.public IRubyObject write_float(ThreadContext context, IRubyObject value)
value
- The value to write.public IRubyObject put_float32(ThreadContext context, IRubyObject value)
value
- The value to write.public IRubyObject put_float32(ThreadContext context, IRubyObject offset, IRubyObject value)
offset
- The offset from the base pointer address to write the value.value
- The value to write.public IRubyObject read_float(ThreadContext context)
public IRubyObject get_float32(ThreadContext context)
public IRubyObject get_float32(ThreadContext context, IRubyObject offset)
offset
- The offset from the base pointer address to read the value.public IRubyObject write_double(ThreadContext context, IRubyObject value)
value
- The value to write.public IRubyObject put_float64(ThreadContext context, IRubyObject value)
value
- The value to write.public IRubyObject put_float64(ThreadContext context, IRubyObject offset, IRubyObject value)
offset
- The offset from the base pointer address to write the value.value
- The value to write.public IRubyObject read_double(ThreadContext context)
public IRubyObject get_float64(ThreadContext context)
public IRubyObject get_float64(ThreadContext context, IRubyObject offset)
offset
- The offset from the base pointer address to read the value.public IRubyObject get_array_of_int8(ThreadContext context, IRubyObject offset, IRubyObject length)
offset
- The offset from the start of the memory area to read the values.length
- The number of values to be read from memory.public IRubyObject put_array_of_int8(ThreadContext context, IRubyObject offset, IRubyObject arrParam)
offset
- The offset from the start of the memory area to write the values.length
- The number of values to be written to memory.public IRubyObject get_array_of_uint8(ThreadContext context, IRubyObject offset, IRubyObject length)
offset
- The offset from the start of the memory area to read the values.length
- The number of values to be read from memory.public IRubyObject put_array_of_uint8(ThreadContext context, IRubyObject offset, IRubyObject arrParam)
offset
- The offset from the start of the memory area to write the values.length
- The number of values to be written to memory.public IRubyObject get_array_of_int16(ThreadContext context, IRubyObject offset, IRubyObject length)
offset
- The offset from the start of the memory area to read the values.length
- The number of values to be read from memory.public IRubyObject put_array_of_int16(ThreadContext context, IRubyObject offset, IRubyObject arrParam)
offset
- The offset from the start of the memory area to write the values.length
- The number of values to be written to memory.public IRubyObject get_array_of_uint16(ThreadContext context, IRubyObject offset, IRubyObject length)
offset
- The offset from the start of the memory area to read the values.length
- The number of values to be read from memory.public IRubyObject put_array_of_uint16(ThreadContext context, IRubyObject offset, IRubyObject arrParam)
offset
- The offset from the start of the memory area to write the values.length
- The number of values to be written to memory.public IRubyObject get_array_of_int32(ThreadContext context, IRubyObject offset, IRubyObject length)
offset
- The offset from the start of the memory area to read the values.length
- The number of values to be read from memory.public IRubyObject put_array_of_int32(ThreadContext context, IRubyObject offset, IRubyObject arrParam)
offset
- The offset from the start of the memory area to write the values.length
- The number of values to be written to memory.public IRubyObject get_array_of_uint32(ThreadContext context, IRubyObject offset, IRubyObject length)
offset
- The offset from the start of the memory area to read the values.length
- The number of values to be read from memory.public IRubyObject put_array_of_uint32(ThreadContext context, IRubyObject offset, IRubyObject arrParam)
offset
- The offset from the start of the memory area to write the values.length
- The number of values to be written to memory.public IRubyObject get_array_of_long(ThreadContext context, IRubyObject offset, IRubyObject length)
offset
- The offset from the start of the memory area to read the values.length
- The number of values to be read from memory.public IRubyObject put_array_of_long(ThreadContext context, IRubyObject offset, IRubyObject arr)
offset
- The offset from the start of the memory area to write the values.length
- The number of values to be written to memory.public IRubyObject get_array_of_ulong(ThreadContext context, IRubyObject offset, IRubyObject length)
offset
- The offset from the start of the memory area to read the values.length
- The number of values to be read from memory.public IRubyObject put_array_of_ulong(ThreadContext context, IRubyObject offset, IRubyObject arr)
offset
- The offset from the start of the memory area to write the values.length
- The number of values to be written to memory.public IRubyObject get_array_of_int64(ThreadContext context, IRubyObject offset, IRubyObject length)
offset
- The offset from the start of the memory area to read the values.length
- The number of values to be read from memory.public IRubyObject put_array_of_int64(ThreadContext context, IRubyObject offset, IRubyObject arrParam)
offset
- The offset from the start of the memory area to write the values.length
- The number of values to be written to memory.public IRubyObject get_array_of_uint64(ThreadContext context, IRubyObject offset, IRubyObject length)
offset
- The offset from the start of the memory area to read the values.length
- The number of values to be read from memory.public IRubyObject put_array_of_uint64(ThreadContext context, IRubyObject offset, IRubyObject arrParam)
offset
- The offset from the start of the memory area to write the values.length
- The number of values to be written to memory.public IRubyObject get_array_of_float(ThreadContext context, IRubyObject offset, IRubyObject length)
offset
- The offset from the start of the memory area to read the values.length
- The number of values to be read from memory.public IRubyObject put_array_of_float(ThreadContext context, IRubyObject offset, IRubyObject arrParam)
offset
- The offset from the start of the memory area to write the values.length
- The number of values to be written to memory.public IRubyObject get_array_of_float64(ThreadContext context, IRubyObject offset, IRubyObject length)
offset
- The offset from the start of the memory area to read the values.length
- The number of values to be read from memory.public IRubyObject put_array_of_float64(ThreadContext context, IRubyObject offset, IRubyObject arrParam)
offset
- The offset from the start of the memory area to write the values.arrParam
- Array of values to write to memory.public IRubyObject read_array_of_int8(ThreadContext context, IRubyObject length)
length
- The number of values to be read from memory.public IRubyObject write_array_of_int8(ThreadContext context, IRubyObject ary)
ary
- The array of values to write to the memory area.public IRubyObject read_array_of_uint8(ThreadContext context, IRubyObject length)
length
- The number of values to be read from memory.public IRubyObject write_array_of_uint8(ThreadContext context, IRubyObject ary)
ary
- The array of values to write to the memory area.ary
- Array of values to write to memory.public IRubyObject read_array_of_int16(ThreadContext context, IRubyObject length)
length
- The number of values to be read from memory.public IRubyObject write_array_of_int16(ThreadContext context, IRubyObject ary)
ary
- The array of values to write to the memory area.public IRubyObject read_array_of_uint16(ThreadContext context, IRubyObject length)
length
- The number of values to be read from memory.public IRubyObject write_array_of_uint16(ThreadContext context, IRubyObject ary)
ary
- The array of values to write to the memory area.public IRubyObject read_array_of_int32(ThreadContext context, IRubyObject length)
length
- The number of values to be read from memory.public IRubyObject write_array_of_int32(ThreadContext context, IRubyObject ary)
ary
- The array of values to write to the memory area.public IRubyObject read_array_of_uint32(ThreadContext context, IRubyObject length)
length
- The number of values to be read from memory.public IRubyObject write_array_of_uint32(ThreadContext context, IRubyObject ary)
ary
- The array of values to write to the memory area.public IRubyObject read_array_of_int64(ThreadContext context, IRubyObject length)
length
- The number of values to be read from memory.public IRubyObject write_array_of_int64(ThreadContext context, IRubyObject ary)
ary
- The array of values to write to the memory area.public IRubyObject read_array_of_uint64(ThreadContext context, IRubyObject length)
length
- The number of values to be read from memory.public IRubyObject write_array_of_uint64(ThreadContext context, IRubyObject ary)
ary
- The array of values to write to the memory area.public IRubyObject read_array_of_long(ThreadContext context, IRubyObject length)
length
- The number of values to be read from memory.public IRubyObject write_array_of_long(ThreadContext context, IRubyObject ary)
ary
- The array of values to write to the memory area.public IRubyObject read_array_of_ulong(ThreadContext context, IRubyObject length)
length
- The number of values to be read from memory.public IRubyObject write_array_of_ulong(ThreadContext context, IRubyObject ary)
ary
- The array of values to write to the memory area.public IRubyObject read_array_of_float(ThreadContext context, IRubyObject length)
length
- The number of values to be read from memory.public IRubyObject write_array_of_float(ThreadContext context, IRubyObject ary)
ary
- The array of values to write to the memory area.public IRubyObject read_array_of_float64(ThreadContext context, IRubyObject length)
length
- The number of values to be read from memory.public IRubyObject write_array_of_float64(ThreadContext context, IRubyObject ary)
ary
- The array of values to write to the memory area.public IRubyObject read_array_of_type(ThreadContext context, IRubyObject typeArg, IRubyObject lenArg)
public IRubyObject read_array_of_type(ThreadContext context, IRubyObject typeArg, IRubyObject reader, IRubyObject lenArg)
public IRubyObject write_array_of_type(ThreadContext context, IRubyObject typeArg, IRubyObject aryArg)
public IRubyObject write_array_of_type(ThreadContext context, IRubyObject typeArg, IRubyObject writer, IRubyObject aryArg)
public IRubyObject read_string(ThreadContext context)
public IRubyObject read_string(ThreadContext context, IRubyObject rbLength)
public IRubyObject get_string(ThreadContext context)
public IRubyObject get_string(ThreadContext context, IRubyObject offArg)
public IRubyObject get_string(ThreadContext context, IRubyObject offArg, IRubyObject lenArg)
public IRubyObject get_array_of_string(ThreadContext context, IRubyObject rbOffset)
public IRubyObject get_array_of_string(ThreadContext context, IRubyObject rbOffset, IRubyObject rbCount)
public IRubyObject read_array_of_string(ThreadContext context)
public IRubyObject read_array_of_string(ThreadContext context, IRubyObject rbLength)
public IRubyObject put_string(ThreadContext context, IRubyObject offArg, IRubyObject strArg)
public IRubyObject write_string(ThreadContext context, IRubyObject strArg)
public IRubyObject write_string(ThreadContext context, IRubyObject strArg, IRubyObject lenArg)
public IRubyObject get_bytes(ThreadContext context, IRubyObject offArg, IRubyObject lenArg)
public IRubyObject put_bytes(ThreadContext context, IRubyObject[] args)
public IRubyObject read_bytes(ThreadContext context, IRubyObject lenArg)
public IRubyObject write_bytes(ThreadContext context, IRubyObject[] args)
public IRubyObject read_pointer(ThreadContext context)
public IRubyObject get_pointer(ThreadContext context)
public IRubyObject get_pointer(ThreadContext context, IRubyObject offset)
public IRubyObject write_pointer(ThreadContext context, IRubyObject value)
public IRubyObject put_pointer(ThreadContext context, IRubyObject value)
public IRubyObject put_pointer(ThreadContext context, IRubyObject offset, IRubyObject value)
public IRubyObject get_array_of_pointer(ThreadContext context, IRubyObject offset, IRubyObject length)
public IRubyObject put_array_of_pointer(ThreadContext context, IRubyObject offset, IRubyObject arrParam)
public IRubyObject read_array_of_pointer(ThreadContext context, IRubyObject length)
public IRubyObject write_array_of_pointer(ThreadContext context, IRubyObject arrParam)
public IRubyObject put_callback(ThreadContext context, IRubyObject offset, IRubyObject proc, IRubyObject cbInfo)
public IRubyObject op_plus(ThreadContext context, IRubyObject value)
public final IRubyObject order(ThreadContext context)
public final IRubyObject order(ThreadContext context, IRubyObject byte_order)
public final IRubyObject to_ptr(ThreadContext context)
public final IRubyObject slice(ThreadContext context, IRubyObject offset, IRubyObject size)
public abstract AbstractMemory order(Ruby runtime, ByteOrder order)
protected abstract AbstractMemory slice(Ruby runtime, long offset)
protected abstract AbstractMemory slice(Ruby runtime, long offset, long size)
Copyright © 2001-2015 JRuby. All Rights Reserved.