Re: Memory Blowup Issues
- To: mathgroup at smc.vnet.net
- Subject: [mg126777] Re: Memory Blowup Issues
- From: W Craig Carter <ccarter at mit.edu>
- Date: Thu, 7 Jun 2012 05:17:36 -0400 (EDT)
- Delivered-to: l-mathgroup@mail-archive0.wolfram.com
- References: <201206010918.FAA11834@smc.vnet.net> <jqf98n$a65$1@smc.vnet.net> <201206060852.EAA17896@smc.vnet.net>
Hello,
I find the following function to be a useful way to extract information
for memory management:
checkMemory[]:=Grid@Sort[{ByteCount[ToExpression[#]], HoldForm[#]} &
/@ Names["Global`*"], (First[#1] > First[#2]) &]
This returns a list of symbols ranked by their ByteCount. However, I am
not sure if evaluating checkMemory causes a momentary doubling of memory
for each evaluation of ByteCount=85.
I thought I would pass this along for anyone who might be hunting for
such a thing=85
W Craig Carter
Professor of Materials Science, MIT
On Jun 6, , at Wed Jun 6, 12 @4:52 AM, David Bailey wrote:
> On 03/06/2012 10:03, Ralph Dratman wrote:
>> Kevin,
>>
>> Thank you for passing along those tips. I usually put $HistoryLength=1
>> and also turn off "Enable Notebook History Tracking" in the
>> Preferences dialog -- though I'm not sure the latter makes any
>> difference.
>>
>> I just want to re-emphasize how egregious I think the situation with
>> crashing really is. It is unacceptable. I hope everyone is making that
>> absolutely clear to WRI. How can we continue to recommend a program
>> which often crashes? It defies common sense.
>>
>
>
> To be fair to WRI, I think the problem is that you have a very complex
> piece of software that is partly programmed by users. The kernel does
> put out a message if it runs out of memory, so it does detect the
> problem (at least under Windows!), but leaving the software in a well
> defined and useful state is another matter. The FrontEnd should remain
> running.
>
> It is also possible to run calculations using MemoryConstrained.
>
> Assuming the data you are reading in is an array or real numbers (or of
> integers), you should check if Import returns a packed array, and pack
> it if necessary - this will save a lot of space.
>
> David Bailey
> http://www.dbaileyconsultancy.co.uk
>
- References:
- Memory Blowup Issues
- From: "Kevin J. McCann" <kjm@KevinMcCann.com>
- Re: Memory Blowup Issues
- From: David Bailey <dave@removedbailey.co.uk>
- Memory Blowup Issues