Re: [NTLK] Freezing packages

From: Paul Guyot (pguyot_at_kallisys.net)
Date: Sun May 23 2004 - 11:08:15 PDT


Aux environs du 23/05/04 à 10:53 -0700, sous le titre "Re: [NTLK]
Freezing packages", Martin Joseph prit sa plus belle plume pour
écrire les mots suivants:
>On May 23, 2004, at 2:06 AM, Robert Benschop wrote:
>
>> On 23-mei-04, at 10:33, Martin Joseph wrote:
>>> I don't know either, but it still seems like you should be able to
>>> freeze rom based packages.
>>
>> How? ROM stands for read only memory, so how can it be altered or
>> adjusted?
>> The fact that there's an option to freeze them is strange but the fact
>> that nothing happens seems to support this.
>The package itself is stored in ROM... But in order to RUN it needs to
>use heap also. freezing could release the heap spaced used by the
>running program...

Programs in ROM consume very few heap when they are not opened.

Typically, they insert the following to the Root frame:

a frame with three slots
_parent slot
_proto slot
viewCObject slot

All three symbols are ROM.
The symbol of the slot with this frame in the Root frame is in ROM.
The last slot is NIL. The _parent proto is the root, it's in RAM
indeed, but heh, you need it anyway. The _proto slot is in ROM.

So the total would be:
- an entry in the Root frame (8 bytes)
- a frame with three symbols (48 bytes)

It could even be decreased by sharing the map among several
applications and put it in ROM or using a supermap with these three
symbols.

Actually, I just checked, at least for Names, the map is in ROM. So
this takes 8+24 bytes.

Would you freeze Names for 32 bytes of heap?

BTW, there is no such things as packages stored in ROM. Packages are
totally different from application in ROM. Packages can be frozen and
are loaded at startup (which takes time).

Paul

-- 
Philosophie de baignoire - consultations sur rendez-vous.
NPDS/NewtonOS: http://newton.kallisys.net:8080/
Apache/FreeBSD: http://www.kallisys.com/
-- 
This is the NewtonTalk list - http://www.newtontalk.net/ for all inquiries
Official Newton FAQ: http://www.chuma.org/newton/faq/
WikiWikiNewt for all kinds of articles: http://tools.unna.org/wikiwikinewt/


This archive was generated by hypermail 2.1.5 : Sun May 23 2004 - 11:30:02 PDT