Re: [long] Mathematica 5.1 and memory: any garbage collection?
- To: mathgroup at smc.vnet.net
- Subject: [mg59759] Re: [long] Mathematica 5.1 and memory: any garbage collection?
- From: some.poster at use.net
- Date: Sat, 20 Aug 2005 03:13:48 -0400 (EDT)
- References: <de12lv$8ka$1@smc.vnet.net>
- Reply-to: jcd at q-e-d.org
- Sender: owner-wri-mathgroup at wolfram.com
Thanks to every poster who took the time to answer my silly question. Yes, I was a little upset by not being able to find a way out by myself. First of all, as my original post mentionned, I've always found Mathematica a great tool, since version 2.2. The only catch that was getting myself blind is that I almost never had to routinely deal with really large amount of data. Hence, I never had to bother with this issues. In my view, restricting In and Out was acting on the _displayed_ output, not on the internally stored results. I cheerfully admit to have completely overlooked the fact that, regardless of the ending semicolumn of a statement (which only affect display of resulting value), its internal value was always stored in history, silently eating up more and more memory space. As every Mathematica user, I've used i.e. % or %% to get it back, without thinking a bit further. I apologize for my somehow initial caustic phrasing. Let me add a final note on particulars mentionned in warious answers: grr... at sarj.ca : I'm quite surprised at the numbers as they show up from your own run. I just triple checked here and got consistent values with those posted (a direct paste from the Mathematica notebook). This run is done without any initial package loaded, nor any init cell, just a plain vanilla Mathematica install. By curiosity, which platform are you running Mathematica under? Could some kind soul cut the code in my initial posting and paste/run it on a comparable platform/version to check numbers, please? Jens : I'll have a look on its action. Nonetheless, I feel that the need to invoke a _developer_ function (only found in latest versions) is somehow an awkward answer to a very basic need. Should the docs mention more clearly that freeing memory can in most cases be achieved by setting $HistoryLength to some low value, then this question wouldn't have bothered you once more here. I don't mean _your_ answer is awkward, just that when looking up the master index on things like memory or similar doesn't lead to the $HistoryLength thing, safe to say: "Use a setting such as $HistoryLength=10 to limit the number of input and output lines stored". The fact that output != display is easily overlooked, at least did I. The use of the term "lines" just add some more potential confusion. Not to blur my own idiocy, but I feel this part needs rephrasing/clarifying, specially since memory management is a common concern for almost every Mathematica user. Thanks to all. J-C Deschamps
- Follow-Ups:
- Re: Re: [long] Mathematica 5.1 and memory: any garbage collection?
- From: ggroup@sarj.ca
- Re: Re: [long] Mathematica 5.1 and memory: any garbage collection?