Memory Allocated in S-PLUS Frames

DESCRIPTION:

Reports the number of bytes allocated for each S-PLUS frame.

USAGE:

allocated()

VALUE:

vector showing the total amount of storage in bytes allocated in each evaluation frame. The names attribute gives the name of the function called in each frame.

DETAILS:

Note that allocated does not show the memory usage for objects stored in database frames.

SEE ALSO:

, , , .

EXAMPLES:

# Default allocations when called at top level
allocated()

# A function to track allocation changes:
"myfun"<- function() {
        at.start <- allocated()
        # ... do some work ...
        now <- allocated()
        # changes in allocations
        now - at.start
}