Skip to contents

The memory an R8 value holds, in bytes. For a value of a Rust-stored type, the bytes its codec reports for the state, plus the size of each field read so far that is not a view of the state; a view's memory is the state's. For an R-stored value, utils::object.size().

Usage

r8size(x)

Arguments

x

An R8 value.

Value

Double: The size in bytes.

Examples

op <- options(r8.namespace = "demo")
Resampler <- new_struct("Resampler", fields = list(n = type_integer()))
r8size(Resampler(n = 10L))
#> [1] 640
options(op)