[Date Index] [Thread Index] [Author Index]
Re: release memory
On 4/3/09 at 4:37 AM, summertan at hotmail.com (summer) wrote: >I am doing a long memory consuming calculation. At certain point I >get variable contaning huge amount of numerical data. I process it >and don't need it anymore. >Is there a way to delete it and RELEASE the memory it takes, i. e. >make it available? >I tried ClearAll[...], it deletes the variable but the memory >doesn't become available - I watch the Windows Task Manager and it >doesn't show increase in the available memory. If you haven't read the following tutorials you should tutorial/BasicInternalArchitecture tutorial/MemoryManagement One of the keys is to realize memory will not be released until there are no references to it in the current session. In particular, if you have not set $HistoryLength = 0 in the session, you likely will have references to things you are not aware of and find it difficult to reclaim all memory. One convenient way to release memory for several variables at a time is create a context before creating those variables. Then the utility CleanSlate can be used to delete the context with all of the variables it contains, releasing the memory associated with them.