memory.limit
Memory Limit and Size

Description

Retrieves the maximum total allocated space and the total allocated space, or increases the memory maximum limits. (Both options are specific to Microsoft Windows.)

Usage

memory.limit(size = NA)
memory.size(max = FALSE) 

Arguments

size a numeric value specifying the new maximum memory use allowed (in megabytes). NA retrieves the current memory limit(in megabytes).
max a logical value. If TRUE, returns from the operating system the maximum of total allocated space. If FALSE (the default), returns the current total allocated space (that is, memory in use).

Details

If size is a numeric value, and not NA, memory.limit specifies a new memory limit (in megabytes). If size is less than the previous memory limit, a warning is given.
memory.size gets the allocated memory space--either the maximum or the memory currently in use--depending on the value of the max argument.
Value
memory.limit returns an integer value giving the current maximum memory use allowed (in megabytes).
memory.size returns the maximum total allocated memory or total memory in use (in megabytes).
See Also
mem.limits, gc, memory.profile
Examples
(m <- memory.limit(NA))
memory.limit(m - 10)  # Warning:  cannot decrease memory limit: ignored
memory.limit(m + 100)  # OK.

memory.size(FALSE) memory.size(max = TRUE)

Package utils version 6.0.0-69
Package Index