Re: [NTLK] Can someone explain Heap?

From: Jim Witte (jswitte_at_bloomington.in.us)
Date: Fri Aug 16 2002 - 23:47:45 EDT


> For instance, what is heap, what does it do, why is it so precious, and
> what
> can I do to manage to conserve it?

   *cracks knuckles* Heap: in a word, the memory of the Newton. PCMCIA
flash cards are memory too, but they're slower and are accessed through
the virtual memory system (which has the notorious -10061 bug). The
heap (or more precisely, several different heaps in DRAM) can be
accessed directly by the CPU. On a 2100 or upgraded 2000, 500 kilobytes
of the DRAM are reserved for what's called the frames heap, where all
the active parts of the packages you're running go (not all of the
package is loaded at once). There are also heaps for the lower-level
parts of the operating system (display memory, pen recognition, etc) as
well as a few that C++ code can use. Paul Guyot or others can correct
me here ;-) The size of the Frames heap is fixed in the operating
system or system patch, and can't be changed (that I know of ;-) Even
if it could be increased, it would most probably break something..

   As for what you can do to conserve it, using a small backdrop app
instead of the Extras drawer or Notepad helps, like Avi's Backdrop. All
active packages including extensions take up a small amount of heap
space - I've found if I freeze all the extensions I'm not using - like
the Ethernet and Internet extensions - I can save about 7K (indicated by
Avi's BD). Not having a lot of packages open at once helps conserve
it. I've found sometimes that if I restart the Newton the free heap
will increase - I don't know if there are memory leaks somewhere or not.

Jim

-- 
Read the List FAQ/Etiquette: http://www.newtontalk.net/faq.html
Read the Newton FAQ: http://www.chuma.org/newton/faq/
This is the NewtonTalk mailing list - http://www.newtontalk.net/



This archive was generated by hypermail 2.1.2 : Thu Sep 05 2002 - 10:03:49 EDT