Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the forum
Board view  Mix view

Using overlays to hide initialization code (Developers)

posted by mbbrutman Homepage, Washington, USA, 07.08.2026, 01:15

Eeek, I posted in "Announcements!" I fixed that.

Some quick follow-ups:

* The code needs to be 16 bit real-mode. I want it to run on an 8088.
* The code fits in 512KB easily. I'm just offended that I have to keep initialization code around that I'll never use again. I'd rather use the RAM space for more features.
* It the mTCP HTTP server; it's too big to turn it into a TSR, so it's going to be C code forever.

Overlay support seems to be the correct way to handle this situation. I defined my "root" code (always stays resident) and then two sections that can overlay each other. One section was for the init code and the other section was for code that gets used often. I was hoping the initialization code would be forced out of memory but it's possible that the overlay manager is allocating too much space and not evicting it. It's also possible that the overlay manager itself is just so large that it is hiding the savings.

When you think about it, this model of "throw away the init code when you are done with it" is a simplification of the overlay scheme and almost any non-trivial program can benefit from it. I'm just kind of surprised that compilers like Open Watcom addressed the more complicated general overlay mechanism without having a simple path for this more limited use of it.

 

Complete thread:

Back to the forum
Board view  Mix view
23743 Postings in 2250 Threads, 410 registered users (0 online)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum