🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.msdos.programmer
Article #5393

Re: Overlay usage...

#5393
From: Joe Huffman
Date: Fri, 22 Mar 1991 19:39
45 lines
2411 bytes
jlowrey@skat.usc.edu (John 'Fritz' Lowrey) writes:

>	1:  Once the overlay module is no longer needed, is the memory
>		allocated to it freed to the data segment?

Not with most overlay managers.  The only one that I know of that does
this is the one that comes with the Zortech C/C++ compiler called the
'V' (for virtual code) memory model.  Actually the space for the overlay
doesn't come from the data segment it comes from the heap and will be
returned to the heap whenever malloc detects that a failure is about to
occur.  Also note that if malloc doesn't need the space the overlays
may ALL be pulled into memory and once loaded there is virtually no
overhead for calling functions residing in the overlays.

Also important to note is that there are very few (zero?) overlay managers
that support overlaying of data.  All that I am aware of just overlay
code.

>	2:  In a related question, I assume procedures from one overlay
>		module may call those in anther (which seems fairly 
>		inefficient, but logical), how is the memory for these
>		overlay functions dealt with?

Again it depends on the manager.  With most managers you have to manually
specify which modules may be resident simultaneously and where they reside.
Calling a function that will reside on top of the caller can be bad news
(reboot time).  This is very difficult to test for because the call may
only occur during some obscure condition or your code grows a bit more.
The Zortech overlay scheme allows functions to call another other function
safely (admittedly it slows down a bunch) even if it overlays itself.


---
Zortech mailing list: send email to 'ztc-list-request@uunet.uu.net' with:
Add: your-user-name@your-machine-name
In the body of the message.
---
Send Zortech bug reports to 'zortech-bugs@zortech.com'
Send requests for educational discounts to 'zortech-ed@zortech.com'
---
Zortech is my major source of income.  Statements about them or their 
competitors cannot be totally without bias.  

-- 
joe@proto.com
Technical Details
Message-ID: <1991Mar22.193939.6261@proto.com>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!crdgw1!uunet!proto!joe
References: <31248@usc>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!crdgw1!uunet!proto!joe
From: joe@proto.com (Joe Huffman)
Newsgroups: comp.os.msdos.programmer
Subject: Re: Overlay usage...
Message-ID: <1991Mar22.193939.6261@proto.com>
Date: 22 Mar 91 19:39:39 GMT
References: <31248@usc>
Distribution: usa
Organization: Prototronics @ Sandpoint, Idaho
Lines: 45