Top Description Fields Constructors Methods
org.jruby.ext.ffi

public abstract Class AbstractMemory

extends MemoryObject
Class Inheritance
Known Direct Subclasses
org.jruby.ext.ffi.Buffer, org.jruby.ext.ffi.Pointer
Annotations
@JRubyClass
name:FFI::AbtractMemoryAbstractMemory
parent:Object
Imports
java.nio.ByteOrder, org.jcodings.specific.ASCIIEncoding, org.jruby.Ruby, .RubyArray, .RubyClass, .RubyFixnum, .RubyFloat, .RubyModule, .RubyNumeric, .RubySymbol, org.jruby.anno.JRubyClass, .JRubyMethod, org.jruby.api.Create, org.jruby.internal.runtime.methods.DynamicMethod, org.jruby.runtime.Arity, .ThreadContext, org.jruby.runtime.builtin.IRubyObject, org.jruby.util.ByteList

A abstract memory object that defines operations common to both pointers and memory buffers

Field Summary

Modifier and TypeField and Description
public static final String
protected long
size

The total size of the memory area

protected int
typeSize

The size of each element of this memory area - e.g. :char is 1, :int is 4

Constructor Summary

AccessConstructor and Description
protected
AbstractMemory(Ruby runtime, RubyClass klass, MemoryIO io, long size)

protected
AbstractMemory(Ruby runtime, RubyClass klass, MemoryIO io, long size, int typeSize)

Method Summary

Modifier and TypeMethod and Description
protected MemoryIO
public final IRubyObject
aref(ThreadContext context, IRubyObject indexArg)

protected static final int
pack-priv static AbstractMemory
protected static final RubyArray<T extends IRubyObject>
private static int
public IRubyObject

Returns:

this
clear
(ThreadContext
the thread context
context
)

Clears (zeros out) the memory contents.

public static RubyClass
public boolean

Returns:

true if the memory address of obj is equal to the address of this MemoryPointer.
equals
(Object
The other MemoryPointer to compare to.
obj
)

Overrides org.jruby.RubyObject.equals.

Compares this MemoryPointer to another MemoryPointer.

public final IRubyObject
get(ThreadContext context, IRubyObject typeName, IRubyObject offset, IRubyObject value)

public IRubyObject

Returns:

An array containing the values.
get_array_of_float
(ThreadContext
The thread context.
context
,
IRubyObject
The offset from the start of the memory area to read the values.
offset
,
IRubyObject
The number of values to be read from memory.
length
)

Reads an array of signed 32 bit floating point values from the memory address.

public IRubyObject

Returns:

An array containing the values.
get_array_of_float64
(ThreadContext
The thread context.
context
,
IRubyObject
The offset from the start of the memory area to read the values.
offset
,
IRubyObject
The number of values to be read from memory.
length
)

Reads an array of signed 64 bit floating point values from the memory address.

public IRubyObject

Returns:

An array containing the values.
get_array_of_int16
(ThreadContext
The thread context.
context
,
IRubyObject
The offset from the start of the memory area to read the values.
offset
,
IRubyObject
The number of values to be read from memory.
length
)

Reads an array of signed 16 bit integer values from the memory address.

public IRubyObject

Returns:

An array containing the values.
get_array_of_int32
(ThreadContext
The thread context.
context
,
IRubyObject
The offset from the start of the memory area to read the values.
offset
,
IRubyObject
The number of values to be read from memory.
length
)

Reads an array of signed 32 bit integer values from the memory address.

public IRubyObject

Returns:

An array containing the values.
get_array_of_int64
(ThreadContext
The thread context.
context
,
IRubyObject
The offset from the start of the memory area to read the values.
offset
,
IRubyObject
The number of values to be read from memory.
length
)

Reads an array of signed 64 bit integer values from the memory address.

public IRubyObject

Returns:

An array containing the values.
get_array_of_int8
(ThreadContext
the thread context
context
,
IRubyObject
The offset from the start of the memory area to read the values.
offset
,
IRubyObject
The number of values to be read from memory.
length
)

Reads an array of signed 8 bit integer values from the memory address.

public IRubyObject

Returns:

An array containing the values.
get_array_of_long
(ThreadContext
The thread context.
context
,
IRubyObject
The offset from the start of the memory area to read the values.
offset
,
IRubyObject
The number of values to be read from memory.
length
)

Reads an array of signed long integer values from the memory address.

public IRubyObject
public IRubyObject
public IRubyObject
public IRubyObject

Returns:

An array containing the values.
get_array_of_uint16
(ThreadContext
The thread context.
context
,
IRubyObject
The offset from the start of the memory area to read the values.
offset
,
IRubyObject
The number of values to be read from memory.
length
)

Reads an array of unsigned 16 bit integer values from the memory address.

public IRubyObject

Returns:

An array containing the values.
get_array_of_uint32
(ThreadContext
The thread context.
context
,
IRubyObject
The offset from the start of the memory area to read the values.
offset
,
IRubyObject
The number of values to be read from memory.
length
)

Reads an array of unsigned 32 bit integer values from the memory address.

public IRubyObject

Returns:

An array containing the values.
get_array_of_uint64
(ThreadContext
The thread context.
context
,
IRubyObject
The offset from the start of the memory area to read the values.
offset
,
IRubyObject
The number of values to be read from memory.
length
)

Reads an array of unsigned 64 bit integer values from the memory address.

public IRubyObject

Returns:

An array containing the values.
get_array_of_uint8
(ThreadContext
The thread context.
context
,
IRubyObject
The offset from the start of the memory area to read the values.
offset
,
IRubyObject
The number of values to be read from memory.
length
)

Reads an array of unsigned 8 bit integer values from the memory address.

public IRubyObject

Returns:

An array containing the values.
get_array_of_ulong
(ThreadContext
The thread context.
context
,
IRubyObject
The offset from the start of the memory area to read the values.
offset
,
IRubyObject
The number of values to be read from memory.
length
)

Reads an array of unsigned long integer values from the memory address.

public IRubyObject
public IRubyObject

Returns:

The value read from the address.
get_float32
(ThreadContext
the thread context
context
)

Reads a 32 bit floating point value from the memory address.

public IRubyObject

Returns:

The value read from the address.
get_float32
(ThreadContext
the thread context
context
,
IRubyObject
The offset from the base pointer address to read the value.
offset
)

Reads a 32 bit floating point value from the memory address.

public IRubyObject

Returns:

The value read from the address.
get_float64
(ThreadContext
the thread context
context
)

Reads a 64 bit floating point value from the memory address.

public IRubyObject

Returns:

The value read from the address.
get_float64
(ThreadContext
the thread context
context
,
IRubyObject
The offset from the base pointer address to read the value.
offset
)

Reads a 64 bit floating point value from the memory address.

public IRubyObject

Returns:

The value read from the address.
get_int16
(ThreadContext
the thread context
context
)

Reads a 16 bit signed integer value from the memory address.

public IRubyObject

Returns:

The value read from the address.
get_int16
(ThreadContext
the thread context
context
,
IRubyObject
The offset from the base pointer address to read the value.
offset
)

Reads a 16 bit signed integer value from the memory address.

public IRubyObject

Returns:

The value read from the address.
get_int32
(ThreadContext
the thread context
context
)

Reads a 32 bit signed integer value from the memory address.

public IRubyObject

Returns:

The value read from the address.
get_int32
(ThreadContext
the thread context
context
,
IRubyObject
The offset from the base pointer address to read the value.
offset
)

Reads a 32 bit signed integer value from the memory address.

public IRubyObject

Returns:

The value read from the address.
get_int64
(ThreadContext
the thread context
context
)

Reads a 64 bit integer value from the memory address.

public IRubyObject

Returns:

The value read from the address.
get_int64
(ThreadContext
the thread context
context
,
IRubyObject
The offset from the base pointer address to read the value.
offset
)

Reads a 64 bit integer value from the memory address.

public IRubyObject

Returns:

The value read from the address.
get_int8
(ThreadContext
the thread context
context
)

Reads an 8 bit signed integer value from the memory address.

public IRubyObject

Returns:

The value read from the address.
get_int8
(ThreadContext
the thread context
context
,
IRubyObject
The offset from the base pointer address to read the value.
offset
)

Reads an 8 bit signed integer value from the memory address.

public IRubyObject

Returns:

The value read.
get_long
(ThreadContext
the thread context
context
)

Reads a C long integer value from the memory area.

public IRubyObject

Returns:

The value read.
get_long
(ThreadContext
the thread context
context
,
IRubyObject
The offset from the base pointer address to read the value.
offset
)

Reads a C long integer value from the memory area.

public IRubyObject
public IRubyObject
public IRubyObject
public IRubyObject
public IRubyObject
public IRubyObject

Returns:

The value read from the address.
get_uint16
(ThreadContext
the thread context
context
)

Reads a 16 bit unsigned integer value from the memory address.

public IRubyObject

Returns:

The value read from the address.
get_uint16
(ThreadContext
the thread context
context
,
IRubyObject
The offset from the base pointer address to read the value.
offset
)

Reads a 16 bit unsigned integer value from the memory address.

public IRubyObject

Returns:

The value read from the address.
get_uint32
(ThreadContext
the thread context
context
)

Reads a 32 bit unsigned integer value from the memory address.

public IRubyObject

Returns:

The value read from the address.
get_uint32
(ThreadContext
the thread context
context
,
IRubyObject
The offset from the base pointer address to read the value.
offset
)

Reads a 32 bit unsigned integer value from the memory address.

public IRubyObject

Returns:

The value read from the address.
get_uint64
(ThreadContext
the thread context
context
)

Reads a 64 bit unsigned integer value from the memory address.

public IRubyObject

Returns:

The value read from the address.
get_uint64
(ThreadContext
the thread context
context
,
IRubyObject
The offset from the base pointer address to read the value.
offset
)

Reads a 64 bit unsigned integer value from the memory address.

public IRubyObject

Returns:

The value read from the address.
get_uint8
(ThreadContext
the thread context
context
)

Reads an 8 bit unsigned integer value from the memory address.

public IRubyObject

Returns:

The value read from the address.
get_uint8
(ThreadContext
the thread context
context
,
IRubyObject
The offset from the base pointer address to read the value.
offset
)

Reads an 8 bit unsigned integer value from the memory address.

public IRubyObject

Returns:

The value read.
get_ulong
(ThreadContext
the thread context
context
)

Reads a C unsigned long integer value from the memory area.

public IRubyObject

Returns:

The value read.
get_ulong
(ThreadContext
the thread context
context
,
IRubyObject
The offset from the base pointer address to read the value.
offset
)

Reads a C unsigned long integer value from the memory area.

protected final long

Returns:

The total offset from the base memory pointer.
getOffset
(IRubyObject
The offset to add to the base offset.
offset
)

Calculates the absolute offset within the base memory pointer for a given offset.

protected abstract Pointer
getPointer(Ruby runtime, long offset)

public final long

Returns:

The size of the memory area.
getSize
()

Gets the size of the memory area.

public RubyFixnum

Returns:

A RubyFixnum containing the hash code.
hash
(ThreadContext
the current thread context
context
)

Overrides org.jruby.RubyBasicObject.hash.

Calculates a hash code for the pointer.

public int

Returns:

The hashcode of the memory address.
hashCode
()

Overrides org.jruby.RubyObject.hashCode.

Calculates the hash code for this MemoryPointer

public IRubyObject
op_equal(ThreadContext context, IRubyObject obj)

Overrides org.jruby.RubyBasicObject.op_equal.

Implements org.jruby.runtime.builtin.IRubyObject.op_equal.

rb_obj_equal Will by default use identity equality to compare objects.

public IRubyObject
public final IRubyObject
public final IRubyObject
order(ThreadContext context, IRubyObject byte_order)

public abstract AbstractMemory
order(Ruby runtime, ByteOrder order)

public final IRubyObject
put(ThreadContext context, IRubyObject typeName, IRubyObject offset)

public IRubyObject

Returns:

this object.
put_array_of_float
(ThreadContext
The thread context.
context
,
IRubyObject
The offset from the start of the memory area to write the values.
offset
,
IRubyObject
Array of values to write to memory.
arrParam
)

Writes an array of 32 bit floating point values to the memory area.

public IRubyObject

Returns:

this object.
put_array_of_float64
(ThreadContext
The thread context.
context
,
IRubyObject
The offset from the start of the memory area to write the values.
offset
,
IRubyObject
Array of values to write to memory.
arrParam
)

Writes an array of 64 bit floating point values to the memory area.

public IRubyObject

Returns:

this object.
put_array_of_int16
(ThreadContext
The thread context.
context
,
IRubyObject
The offset from the start of the memory area to write the values.
offset
,
IRubyObject
Array of values to write to memory.
arrParam
)

Writes an array of signed 16 bit integer values to the memory area.

public IRubyObject

Returns:

this object.
put_array_of_int32
(ThreadContext
The thread context.
context
,
IRubyObject
The offset from the start of the memory area to write the values.
offset
,
IRubyObject
Array of values to write to memory.
arrParam
)

Writes an array of signed 32 bit integer values to the memory area.

public IRubyObject

Returns:

this object.
put_array_of_int64
(ThreadContext
The thread context.
context
,
IRubyObject
The offset from the start of the memory area to write the values.
offset
,
IRubyObject
Array of values to write to memory.
arrParam
)

Writes an array of signed 64 bit integer values to the memory area.

public IRubyObject

Returns:

this object.
put_array_of_int8
(ThreadContext
The thread context.
context
,
IRubyObject
The offset from the start of the memory area to write the values.
offset
,
IRubyObject
Array of values to write to memory.
arrParam
)

Writes an array of signed 8 bit integer values to the memory area.

public IRubyObject

Returns:

this object.
put_array_of_long
(ThreadContext
The thread context.
context
,
IRubyObject
The offset from the start of the memory area to write the values.
offset
,
IRubyObject
Array of values to write to memory.
arr
)

Writes an array of signed long integer values to the memory area.

public IRubyObject
public IRubyObject

Returns:

this object.
put_array_of_uint16
(ThreadContext
The thread context.
context
,
IRubyObject
The offset from the start of the memory area to write the values.
offset
,
IRubyObject
Array of values to write to memory.
arrParam
)

Writes an array of unsigned 16 bit integer values to the memory area.

public IRubyObject

Returns:

this object.
put_array_of_uint32
(ThreadContext
The thread context.
context
,
IRubyObject
The offset from the start of the memory area to write the values.
offset
,
IRubyObject
Array of values to write to memory.
arrParam
)

Writes an array of unsigned 32 bit integer values to the memory area.

public IRubyObject

Returns:

this object.
put_array_of_uint64
(ThreadContext
The thread context.
context
,
IRubyObject
The offset from the start of the memory area to write the values.
offset
,
IRubyObject
Array of values to write to memory.
arrParam
)

Writes an array of unsigned 64 bit integer values to the memory area.

public IRubyObject

Returns:

this object.
put_array_of_uint8
(ThreadContext
The thread context.
context
,
IRubyObject
The offset from the start of the memory area to write the values.
offset
,
IRubyObject
Array of values to write to memory.
arrParam
)

Writes an array of unsigned 8 bit integer values to the memory area.

public IRubyObject

Returns:

this object.
put_array_of_ulong
(ThreadContext
The thread context.
context
,
IRubyObject
The offset from the start of the memory area to write the values.
offset
,
IRubyObject
Array of values to write to memory.
arr
)

Writes an array of unsigned long integer values to the memory area.

public IRubyObject
public IRubyObject
public IRubyObject

Returns:

The value written.
put_float32
(ThreadContext
the thread context
context
,
IRubyObject
The value to write.
value
)

Writes an 32 bit floating point value to the memory area.

public IRubyObject

Returns:

The value written.
put_float32
(ThreadContext
the thread context
context
,
IRubyObject
The offset from the base pointer address to write the value.
offset
,
IRubyObject
The value to write.
value
)

Writes an 32 bit floating point value to the memory area.

public IRubyObject

Returns:

The value written.
put_float64
(ThreadContext
the thread context
context
,
IRubyObject
The value to write.
value
)

Writes an 64 bit floating point value to the memory area.

public IRubyObject

Returns:

The value written.
put_float64
(ThreadContext
the thread context
context
,
IRubyObject
The offset from the base pointer address to write the value.
offset
,
IRubyObject
The value to write.
value
)

Writes an 64 bit floating point value to the memory area.

public IRubyObject

Returns:

The value written.
put_int16
(ThreadContext
the thread context
context
,
IRubyObject
The value to write.
value
)

Writes a 16 bit signed integer value to the memory address.

public IRubyObject

Returns:

The value written.
put_int16
(ThreadContext
the thread context
context
,
IRubyObject
The offset from the base pointer address to write the value.
offset
,
IRubyObject
The value to write.
value
)

Writes a 16 bit signed integer value to the memory address.

public IRubyObject

Returns:

The value written.
put_int32
(ThreadContext
the thread context
context
,
IRubyObject
The value to write.
value
)

Writes a 32 bit signed integer value to the memory address.

public IRubyObject

Returns:

The value written.
put_int32
(ThreadContext
the thread context
context
,
IRubyObject
The offset from the base pointer address to write the value.
offset
,
IRubyObject
The value to write.
value
)

Writes a 32 bit signed integer value to the memory address.

public IRubyObject

Returns:

The value written.
put_int64
(ThreadContext
the thread context
context
,
IRubyObject
The value to write.
value
)

Writes a 64 bit integer value to the memory area.

public IRubyObject

Returns:

The value written.
put_int64
(ThreadContext
the thread context
context
,
IRubyObject
The offset from the base pointer address to write the value.
offset
,
IRubyObject
The value to write.
value
)

Writes a 64 bit integer value to the memory area.

public IRubyObject

Returns:

The value written.
put_int8
(ThreadContext
the thread context
context
,
IRubyObject
The value to write.
value
)

Writes a 8 bit signed integer value to the memory area.

public IRubyObject

Returns:

The value written.
put_int8
(ThreadContext
the thread context
context
,
IRubyObject
The offset from the base pointer address to write the value.
offset
,
IRubyObject
The value to write.
value
)

Writes a 8 bit signed integer value to the memory area.

public IRubyObject

Returns:

The value written.
put_long
(ThreadContext
the thread context
context
,
IRubyObject
The value to write.
value
)

Writes a C long integer value to the memory area.

public IRubyObject

Returns:

The value written.
put_long
(ThreadContext
the thread context
context
,
IRubyObject
The offset from the base pointer address to write the value.
offset
,
IRubyObject
The value to write.
value
)

Writes a C long integer value to the memory area.

public IRubyObject
public IRubyObject
public IRubyObject
public IRubyObject

Returns:

The value written.
put_uint16
(ThreadContext
the thread context
context
,
IRubyObject
The value to write.
value
)

Writes a 16 bit unsigned integer value to the memory address.

public IRubyObject

Returns:

The value written.
put_uint16
(ThreadContext
the thread context
context
,
IRubyObject
The offset from the base pointer address to write the value.
offset
,
IRubyObject
The value to write.
value
)

Writes a 16 bit unsigned integer value to the memory address.

public IRubyObject

Returns:

The value written.
put_uint32
(ThreadContext
the thread context
context
,
IRubyObject
The value to write.
value
)

Writes an 32 bit unsigned integer value to the memory address.

public IRubyObject

Returns:

The value written.
put_uint32
(ThreadContext
the thread context
context
,
IRubyObject
The offset from the base pointer address to write the value.
offset
,
IRubyObject
The value to write.
value
)

Writes an 32 bit unsigned integer value to the memory address.

public IRubyObject

Returns:

The value written.
put_uint64
(ThreadContext
the thread context
context
,
IRubyObject
The value to write.
value
)

Writes a 64 bit unsigned integer value to the memory area.

public IRubyObject

Returns:

The value written.
put_uint64
(ThreadContext
the thread context
context
,
IRubyObject
The offset from the base pointer address to write the value.
offset
,
IRubyObject
The value to write.
value
)

Writes a 64 bit unsigned integer value to the memory area.

public IRubyObject

Returns:

The value written.
put_uint8
(ThreadContext
the thread context
context
,
IRubyObject
The value to write.
value
)

Writes a 8 bit unsigned integer value to the memory area.

public IRubyObject

Returns:

The value written.
put_uint8
(ThreadContext
the thread context
context
,
IRubyObject
The offset from the base pointer address to write the value.
offset
,
IRubyObject
The value to write.
value
)

Writes a 8 bit unsigned integer value to the memory area.

public IRubyObject

Returns:

The value written.
put_ulong
(ThreadContext
the thread context
context
,
IRubyObject
The value to write.
value
)

Writes a C long integer value to the memory area.

public IRubyObject

Returns:

The value written.
put_ulong
(ThreadContext
the thread context
context
,
IRubyObject
The offset from the base pointer address to write the value.
offset
,
IRubyObject
The value to write.
value
)

Writes a C long integer value to the memory area.

private IRubyObject
putBytes(ThreadContext context, long off, ByteList bl, int idx, int len)

private void
putPointer(ThreadContext context, long offset, IRubyObject value)

private void
putPointer(ThreadContext context, long offset, Pointer value)

public IRubyObject

Returns:

An array containing the values.
read_array_of_float
(ThreadContext
The thread context.
context
,
IRubyObject
The number of values to be read from memory.
length
)

Reads an array of signed 32 bit floating point values from the memory address.

public IRubyObject

Returns:

An array containing the values.
read_array_of_float64
(ThreadContext
The thread context.
context
,
IRubyObject
The number of values to be read from memory.
length
)

Reads an array of signed 64 bit floating point values from the memory address.

public IRubyObject

Returns:

An array containing the values.
read_array_of_int16
(ThreadContext
The thread context.
context
,
IRubyObject
The number of values to be read from memory.
length
)

Reads an array of signed 16 bit integer values from the memory address.

public IRubyObject

Returns:

An array containing the values.
read_array_of_int32
(ThreadContext
The thread context.
context
,
IRubyObject
The number of values to be read from memory.
length
)

Reads an array of signed 32 bit integer values from the memory address.

public IRubyObject

Returns:

An array containing the values.
read_array_of_int64
(ThreadContext
The thread context.
context
,
IRubyObject
The number of values to be read from memory.
length
)

Reads an array of signed 64 bit integer values from the memory address.

public IRubyObject

Returns:

An array containing the values.
read_array_of_int8
(ThreadContext
The thread context.
context
,
IRubyObject
The number of values to be read from memory.
length
)

Reads an array of signed 8 bit integer values from the memory address.

public IRubyObject

Returns:

An array containing the values.
read_array_of_long
(ThreadContext
The thread context.
context
,
IRubyObject
The number of values to be read from memory.
length
)

Reads an array of signed long integer values from the memory address.

public IRubyObject
public IRubyObject
public IRubyObject
public IRubyObject
public IRubyObject
public IRubyObject

Returns:

An array containing the values.
read_array_of_uint16
(ThreadContext
The thread context.
context
,
IRubyObject
The number of values to be read from memory.
length
)

Reads an array of unsigned 16 bit integer values from the memory address.

public IRubyObject

Returns:

An array containing the values.
read_array_of_uint32
(ThreadContext
The thread context.
context
,
IRubyObject
The number of values to be read from memory.
length
)

Reads an array of unsigned 32 bit integer values from the memory address.

public IRubyObject

Returns:

An array containing the values.
read_array_of_uint64
(ThreadContext
The thread context.
context
,
IRubyObject
The number of values to be read from memory.
length
)

Reads an array of unsigned 64 bit integer values from the memory address.

public IRubyObject

Returns:

An array containing the values.
read_array_of_uint8
(ThreadContext
The thread context.
context
,
IRubyObject
The number of values to be read from memory.
length
)

Reads an array of unsigned 8 bit integer values from the memory address.

public IRubyObject

Returns:

An array containing the values.
read_array_of_ulong
(ThreadContext
The thread context.
context
,
IRubyObject
The number of values to be read from memory.
length
)

Reads an array of unsigned long integer values from the memory address.

public IRubyObject
public IRubyObject

Returns:

The value read from the address.
read_char
(ThreadContext
the thread context
context
)

Reads an 8 bit signed integer value from the memory address.

public IRubyObject

Returns:

The value read from the address.
read_double
(ThreadContext
the thread context
context
)

Reads a 64 bit floating point value from the memory address.

public IRubyObject

Returns:

The value read from the address.
read_float
(ThreadContext
the thread context
context
)

Reads a 32 bit floating point value from the memory address.

public IRubyObject

Returns:

The value read from the address.
read_int
(ThreadContext
the thread context
context
)

Reads a 32 bit signed integer value from the memory address.

public IRubyObject

Returns:

The value read.
read_long
(ThreadContext
the thread context
context
)

Reads a C long integer value from the memory area.

public IRubyObject

Returns:

The value read from the address.
read_long_long
(ThreadContext
the thread context
context
)

Reads a 64 bit integer value from the memory address.

public IRubyObject
public IRubyObject

Returns:

The value read from the address.
read_short
(ThreadContext
the thread context
context
)

Reads a 16 bit signed integer value from the memory address.

public IRubyObject
public IRubyObject
public IRubyObject

Returns:

The value read from the address.
read_uchar
(ThreadContext
the thread context
context
)

Reads an 8 bit unsigned integer value from the memory address.

public IRubyObject

Returns:

The value read from the address.
read_uint
(ThreadContext
the thread context
context
)

Reads a 32 bit unsigned integer value from the memory address.

public IRubyObject

Returns:

The value read from the address.
read_uint16
(ThreadContext
the thread context
context
)

Reads a 16 bit unsigned integer value from the memory address.

public IRubyObject

Returns:

The value read from the address.
read_uint8
(ThreadContext
the thread context
context
)

Reads a 8 bit unsigned integer value from the memory address.

public IRubyObject

Returns:

The value read.
read_ulong
(ThreadContext
the thread context
context
)

Reads a C unsigned long integer value from the memory area.

public IRubyObject

Returns:

The value read from the address.
read_ulong_long
(ThreadContext
the thread context
context
)

Reads a 64 bit unsigned integer value from the memory address.

public IRubyObject

Returns:

The value read from the address.
read_ushort
(ThreadContext
the thread context
context
)

Reads a 16 bit unsigned integer value from the memory address.

public final IRubyObject
slice(ThreadContext context, IRubyObject offset, IRubyObject size)

protected abstract AbstractMemory
slice(Ruby runtime, long offset)

protected abstract AbstractMemory
slice(Ruby runtime, long offset, long size)

public final IRubyObject
public IRubyObject

Returns:

The total size in bytes.
total
(ThreadContext
the thread context
context
)

Gets the total size (in bytes) of the Memory.

public final IRubyObject

Returns:

the type size
type_size
(ThreadContext
the thread context
context
)

Indicates how many bytes the intrinsic type of the memory uses.

public IRubyObject

Returns:

this object.
write_array_of_float
(ThreadContext
The thread context.
context
,
IRubyObject
The array of values to write to the memory area.
ary
)

Writes an array of 32 bit floating point values to the memory area.

public IRubyObject

Returns:

this object.
write_array_of_float64
(ThreadContext
The thread context.
context
,
IRubyObject
The array of values to write to the memory area.
ary
)

Writes an array of 64 bit floating point values to the memory area.

public IRubyObject

Returns:

this object.
write_array_of_int16
(ThreadContext
The thread context.
context
,
IRubyObject
The array of values to write to the memory area.
ary
)

Writes an array of signed 16 bit integer values to the memory area.

public IRubyObject

Returns:

this object.
write_array_of_int32
(ThreadContext
The thread context.
context
,
IRubyObject
The array of values to write to the memory area.
ary
)

Writes an array of signed 32 bit integer values to the memory area.

public IRubyObject

Returns:

this object.
write_array_of_int64
(ThreadContext
The thread context.
context
,
IRubyObject
The array of values to write to the memory area.
ary
)

Writes an array of signed 64 bit integer values to the memory area.

public IRubyObject

Returns:

this object.
write_array_of_int8
(ThreadContext
The thread context.
context
,
IRubyObject
The array of values to write to the memory area.
ary
)

Writes an array of signed 8 bit integer values to the memory area.

public IRubyObject

Returns:

this object.
write_array_of_long
(ThreadContext
The thread context.
context
,
IRubyObject
The array of values to write to the memory area.
ary
)

Writes an array of signed long integer values to the memory area.

public IRubyObject
public IRubyObject
public IRubyObject
public IRubyObject

Returns:

this object.
write_array_of_uint16
(ThreadContext
The thread context.
context
,
IRubyObject
The array of values to write to the memory area.
ary
)

Writes an array of unsigned 16 bit integer values to the memory area.

public IRubyObject

Returns:

this object.
write_array_of_uint32
(ThreadContext
The thread context.
context
,
IRubyObject
The array of values to write to the memory area.
ary
)

Writes an array of unsigned 32 bit integer values to the memory area.

public IRubyObject

Returns:

this object.
write_array_of_uint64
(ThreadContext
The thread context.
context
,
IRubyObject
The array of values to write to the memory area.
ary
)

Writes an array of unsigned 64 bit integer values to the memory area.

public IRubyObject

Returns:

this object.
write_array_of_uint8
(ThreadContext
The thread context.
context
,
IRubyObject
Array of values to write to memory.
ary
)

Writes an array of unsigned 8 bit integer values to the memory area.

public IRubyObject

Returns:

this object.
write_array_of_ulong
(ThreadContext
The thread context.
context
,
IRubyObject
The array of values to write to the memory area.
ary
)

Writes an array of unsigned long integer values to the memory area.

public IRubyObject
public IRubyObject

Returns:

The value written.
write_char
(ThreadContext
the thread context
context
,
IRubyObject
The value to write.
value
)

Writes a 8 bit signed integer value to the memory area.

public IRubyObject

Returns:

The value written.
write_double
(ThreadContext
the thread context
context
,
IRubyObject
The value to write.
value
)

Writes an 64 bit floating point value to the memory area.

public IRubyObject

Returns:

The value written.
write_float
(ThreadContext
the thread context
context
,
IRubyObject
The value to write.
value
)

Writes an 32 bit floating point value to the memory area.

public IRubyObject

Returns:

The value written.
write_int
(ThreadContext
the thread context
context
,
IRubyObject
The value to write.
value
)

Writes a 32 bit signed integer value to the memory address.

public IRubyObject

Returns:

The value written.
write_long
(ThreadContext
the thread context
context
,
IRubyObject
The value to write.
value
)

Writes a C long integer value to the memory area.

public IRubyObject

Returns:

The value written.
write_long_long
(ThreadContext
the thread context
context
,
IRubyObject
The value to write.
value
)

Writes a 64 bit integer value to the memory area.

public IRubyObject
public IRubyObject

Returns:

The value written.
write_short
(ThreadContext
the thread context
context
,
IRubyObject
The value to write.
value
)

Writes a 16 bit signed integer value to the memory address.

public IRubyObject
public IRubyObject
public IRubyObject

Returns:

The value written.
write_uchar
(ThreadContext
the thread context
context
,
IRubyObject
The value to write.
value
)

Writes a 8 bit unsigned integer value to the memory area.

public IRubyObject

Returns:

The value written.
write_uint
(ThreadContext
the thread context
context
,
IRubyObject
The value to write.
value
)

Writes an 32 bit unsigned integer value to the memory address.

public IRubyObject

Returns:

The value written.
write_ulong_long
(ThreadContext
the thread context
context
,
IRubyObject
The value to write.
value
)

Writes a 64 bit unsigned integer value to the memory area.

public IRubyObject

Returns:

The value written.
write_ushort
(ThreadContext
the thread context
context
,
IRubyObject
The value to write.
value
)

Writes a 16 bit unsigned integer value to the memory address.

Inherited from org.jruby.ext.ffi.MemoryObject:
getMemoryIOsetMemoryIO