R: procmem

procmem {memuse} | R Documentation

## procmem

### Description

Shows the amount of ram used by the current R process.

### Usage

    Sys.procmem(gcFirst = TRUE)

### Arguments

`gcFirst` | logical; determines if garbage collection should be called before getting process memory usage.

### Details

`Sys.procmem()` returns the total memory usage of the current R process, and (if supported), the maximum memory usage as well.

All of the C-level source code for these methods (in src/meminfo of the root directory of the memuse source tree) is licensed under the permissive 2-Clause BSD license.

### Value

Returns a list, whose values are platform dependent in addition to being modified by input arguments.

### See Also

`meminfo`

### Examples

    ## Not run:
    library(memuse)

    ### How much is being used?
    Sys.procmem()

    ### Use more.
    x <- rnorm(1e7)
    Sys.procmem()

    ### Use less.
    rm(x)
    gc(FALSE)
    Sys.procmem()

    ## End(Not run)

[Package memuse version 4.1-0 Index]