Profile Memory Allocation

DESCRIPTION:

Profile the memory allocation during the execution of a S-PLUS expression.

USAGE:

Profile(x, file=NULL)

REQUIRED ARGUMENTS:

x
a S-PLUS expression to profile.

OPTIONAL ARGUMENTS:

file
a character string giving the name of the file for the profile output. The default is standard output.

VALUE:

The value returned is the result of evaluating the S-PLUS expression given by x .

SIDE EFFECTS:

Messages about the amount of memory allocated go to standard output or to a file if a filename is supplied.

DETAILS:

For each S-PLUS function called during the execution of the expression, messages about memory allocation are printed. The messages include the number and type of S-PLUS objects allocated and the number of bytes allocated. Function names are printed with indentation showing function nesting.

If a file having the same name as the file argument already exists, it will be replaced by a new file containing the output.

SEE ALSO:

EXAMPLES:

Profile(mean(c(1,2,10)))