This help topic is for R version 2.9.0. For the current version of R, try https://stat.ethz.ch/R-manual/R-patched/library/utils/html/memory.size.html
memory.size {utils}R Documentation

Report on Memory Allocation

Description

memory.size reports the current or maximum memory allocation of the malloc function used in this version of R.

memory.limit reports or increases the limit in force on the total allocation.

Usage

memory.size(max = FALSE)

memory.limit(size = NA)

Arguments

max

logical. If true the maximum amount of memory obtained from the OS is reported, otherwise the amount currently in use.

size

numeric. If NA report the memory size, otherwise request a new limit, in Mb. Values of up to 4095 are allowed, but see Details.

Details

Command-line flag --max-mem-size sets the maximum value of obtainable memory (including a very small amount of housekeeping overhead). This cannot exceed 3Gb on 32-bit Windows, and most versions of Windows are limited to 2Gb. The minimum is currently 32Mb.

If 32-bit R is run on some 64-bit versions of Windows the maximum value of obtainable memory is just under 4GB.

Memory limits can only be increased.

Value

Size in Mb (1048576 bytes), rounded to 0.01 Mb for memory.size and rounded down for memory.limit.

See Also

Memory-limits for other limits.

The rw-FAQ for more details and references.

Examples

memory.size()
memory.size(TRUE)
memory.limit()

[Package utils version 2.9.0 ]