check.memory {AnalysisPageServer} | R Documentation

## check.memory

### Description

Check memory usage and trigger an event if it exceeds some threshold.

### Usage

    check.memory(events, max.mb, logger = NULL, event.name = "BloatedMemory")

### Arguments

`events` | EventRegistry object
`max.mb` | If the total "used" memory (Ncells + Vcells) is at least this much (in Mb) then trigger the next handler.
`logger` | log4r object. If non-NULL then memory usage is printed there with `info()`. Default: NULL, don't log.
`event.name` | Name of the event to trigger. Default: "BloatedMemory". It is passed `used.mb` and `max.mb` arguments

### Details

Call `gc()` to check memory, possibly print the result to STDERR, then possibly call the next handler you supply if too much memory is being used.

### Value

Nothing

### Author(s)

Brad Friedman

[Package AnalysisPageServer version 1.14.0 Index]