Learn R Programming

ssh.utils (version 1.0)

mem.usage: Measure the resident memory usage of a process.

Description

Returns the memory usage in KB of a process with the specified process id. By default, returns the memory usage of the current R process. This can be used to measure and log the memory usage of the R process during script execution.

Usage

mem.usage(pid = Sys.getpid())

Arguments

pid
Process ID (default is the current process id).

Value

The resident memory usage in KB.

Examples

Run this code
## Not run: 
# mem.usage()
# # [1] 37268
# ## End(Not run)

Run the code above in your browser using DataLab