Method: FFI::AbstractMemory#total

Defined in:
ext/ffi_c/AbstractMemory.c

#sizeInteger Also known as: size

Return memory size in bytes (alias: #total)

Returns:

  • (Integer)


329
330
331
332
333
334
335
336
337
# File 'ext/ffi_c/AbstractMemory.c', line 329

static VALUE
memory_size(VALUE self)
{
    AbstractMemory* ptr;

    TypedData_Get_Struct(self, AbstractMemory, &rbffi_abstract_memory_data_type, ptr);

    return LONG2NUM(ptr->size);
}