Mathematica 9 is now available
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.
Mathematica > Core Language > Expressions > Evaluation Control > MemoryConstrained >

MemoryConstrained

MemoryConstrained
evaluates expr, stopping if more than b bytes of memory are requested.
MemoryConstrained
returns failexpr if the memory constraint is not met.
  • MemoryConstrained generates an interrupt to stop the evaluation of expr if the amount of additional memory requested during the evaluation of expr exceeds b bytes.
Run a command until a memory limit is exceeded:
The loop ran until memory allocation for the result of Range exceeded the limit:
In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
Out[2]=
 
Run a command until a memory limit is exceeded:
In[1]:=
Click for copyable input
Out[1]=
The loop ran until memory allocation for the result of Range exceeded the limit:
In[2]:=
Click for copyable input
Out[2]=
New in 1 | Last modified in 6
Ask a question about this page  |  Suggest an improvement  |  Leave a message for the team
Format:   HTML  |  CDF