object.size {env} R Documentation

Report the Space Allocated for an Object

Description


Provides an estimate of the memory that is being used to store
an R# object.

Exactly which parts of the memory allocation should be attributed
to which object is not clear-cut. This function merely provides
a rough indication: it should be reasonably accurate for atomic
vectors, but does not detect if elements of a list are shared, for
example. (Sharing amongst elements of a character vector is taken
into account, but not that between character vectors in a single
object.)

The calculation Is Of the size Of the Object, And excludes the
space needed To store its name In the symbol table.

Associated space(e.g., the environment of a function And what the
pointer in a EXTPTRSXP points to) Is Not included in the
calculation.

Object sizes are larger On 64-bit builds than 32-bit ones, but will
very likely be the same On different platforms With the same word
length And pointer size.

Usage

object.size(x);

Arguments

x

an R# object.

Details

Authors

SMRUCC genomics Institute

Value

An object of class "object_size" with a length-one double value, an estimate of the memory allocation attributable to the object in bytes.

clr value class

Examples


[Package env version 2.33.856.6961 Index]