env_size {autoharp}R Documentation

Calculates the Total Memory Used

Description

This function uses object_size from the pryr package to compute the total amount of memory used by objects in an environment.

Usage

env_size(env)

Arguments

env

The environment whose size is to be computed.

Details

The names are wrapped in backticks. Otherwise, non-syntactic names will cause problems. This function is used within render_one as part of the runtime stats assessment.

Value

The size in bytes, as a numeric value (scalar).

See Also

object_size

Examples


e1 <- new.env()
env_size(e1)
evalq(x <- 1:10000L, e1)
env_size(e1)

[Package autoharp version 0.0.10 Index]