Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2002
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2002

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Memory leak? Self-created non-executable Help notebook?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg35615] Re: [mg35608] Memory leak? Self-created non-executable Help notebook?
  • From: John Fultz <jfultz at wolfram.com>
  • Date: Tue, 23 Jul 2002 01:51:12 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

I suspect the problem you're seeing is not a memory leak, although it
exhibits the similar (but not identical) symptoms.  On Macintosh OS's
previous to MacOS X, the primitive memory management methods available
make applications much more subject to problems with memory fragmentation
then modern OS's like MacOS X, Unix, and Windows operating systems.
Memory fragmentation can leave a program in a state where there's lots
of room to allocate small blocks of memory, but no room to allocate
large blocks of memory.  In Mathematica 4.1.0, there is one large
block of memory which is frequently allocated and reallocated by
default...it's used as a bitmap backing for the frontmost notebook
window, and its frequent reallocation can contribute significantly to
memory fragmentation..

Likely, the problem you're seeing results after a lot of notebook window
resizes and/or creation/deletion of notebook windows.  The problem
can be worked around by opening up the Option Inspector (Format->Option
Inspector...), setting the scope to global, and setting the "DoubleBuffer"
option to False (just search for DoubleBuffer in the lookup field).
It would be a good idea to restart after this.  The only down side to this
is that you might notice slightly more flicker during screen repaints.

We fixed the fragmentation issue caused by this particular problem in
Mathematica 4.1.2, although you can never expect memory management to
be even remotely as robust as it would be under MacOS X.

Concerning your second question, I suggest changing the stylesheet
on your "My Mathematica Notes" notebook.  Choose
Format->Edit Style Sheet...  and click the option to import a private
copy.  Find the group for the Input style, select the whole group, and
choose Cell->Cell Properties->Cell Evaluatable (which will uncheck the
option).  Now close the styles notebook and re-save the "My Mathematica
Notes" notebook.  From now on, "Input" in this notebook will mean it
shouldn't evaluate, but "Input" in every other notebook will continue
to be evaluatable.  The copy and paste will only transfer the "Input"
stylename, and inherit all of the properties of the Input style
in the appropriate notebook.

Sincerely,

John Fultz
jfultz at wolfram.com
User Interface Group
Wolfram Research, Inc.


> 1)  Working with Mathematica 4.1 on a Mac iBook running OS 9.1 I've recently 
> been encountering repeated situations where, after working with any one 
> of a collection of several different small notebooks for a short time, 
> and perhaps causing some errors, I get a  dialog box that says
> 
>     "There was not enough memory to display a cell.  The cell has
>     been closed.  When you have freed some memory you can open
>     it again by choosing Cell Open the the Cell Properties menu".
> 
> Clicking OK just brings up the box again in an endless loop;  doing a 
> Force Quit usually leads to a crash.  The notebooks are only a dozen 
> cells or so long.  I've increased Mathematica's memory allocation; no help.
> 
> Is this some kind of "memory leak", or . . . ?
> 
> 2)  Possibly related:  I have a "My Mathematica Notes" notebook -- a kind of 
> personalized Help file -- in which I collect misc notes, useful snippets 
> of Mathematica code in the form of Input cells, other examples I've seen on this 
> group or elsewhere.  It's about 140K in size.  I'm not sure but I think 
> the above problem may sometimes occur shortly after I open this Notes 
> notebook to copy a cell out of it.
> 
> I don't want to run or execute any cells in this notebook, ever.  Are 
> there some options or defaults I should set so that none of the Input 
> cells in this notebook will execute while it's open, yet I can copy and 
> paste them as executable Input cells in another notebook I'm working on?



  • Prev by Date: Re: Memory leak? Self-created non-executable Help notebook?
  • Next by Date: Re: Memory leak? Self-created non-executable Help notebook?
  • Previous by thread: Re: Memory leak? Self-created non-executable Help notebook?
  • Next by thread: Re: Memory leak? Self-created non-executable Help notebook?