Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the board
Thread view  Mix view  Order
kerravon

E-mail

Ligao, Free World North,
22.11.2022, 16:30
 

huge memory model (Announce)

When I started writing PDOS/86 I didn't know
what "huge" actually was, and I thought it was
for strange people.

I chose "large" for PDOS/86 and when I went to
use my memory management routines, written in
pure C90, originally for MVS, I found that I
was stuck - I could only manage 64k, even
though I was using large memory model.

Rather than change my seemingly valid C90 code,
I instead put a hack into PDOS/86.

About an hour ago the hack was finally killed
off and the problem was solved simply by
recompiling with the "huge" memory model and
a 32-bit size_t. With pure 8086 instructions
from Watcom C, but using PDPCLIB as the C
library.

Code available at http://pdos.org

BFN. Paul.

Guti

Homepage

25.11.2022, 10:23

@ kerravon

huge memory model

> When I started writing PDOS/86 I didn't know
> what "huge" actually was, and I thought it was
> for strange people.
>
> I chose "large" for PDOS/86 and when I went to
> use my memory management routines, written in
> pure C90, originally for MVS, I found that I
> was stuck - I could only manage 64k, even
> though I was using large memory model.
>
> Rather than change my seemingly valid C90 code,
> I instead put a hack into PDOS/86.
>
> About an hour ago the hack was finally killed
> off and the problem was solved simply by
> recompiling with the "huge" memory model and
> a 32-bit size_t. With pure 8086 instructions
> from Watcom C, but using PDPCLIB as the C
> library.
>
> Code available at http://pdos.org
>
> BFN. Paul.

I discovered huge memory model back in the Turbo C++ days. A simple solution to adress all available conventional memory with chunks larger than 64K.

---
Visit my personal blog at https://www.javiergutierrezchamorro.com

kerravon

E-mail

Ligao, Free World North,
25.11.2022, 19:41

@ Guti

huge memory model

> I discovered huge memory model back in the Turbo C++ days. A simple
> solution to adress all available conventional memory with chunks larger
> than 64K.

I don't think Turbo C generates proper huge
memory model code in its huge option. I think
it just allows more than 64k for the DGROUP.

Guti

Homepage

29.11.2022, 06:55

@ kerravon

huge memory model

Indeed no. Turbo C supported huge pointers allowing to allocate blocks larger than 64K.

https://www.vogons.org/viewtopic.php?t=51678

> > I discovered huge memory model back in the Turbo C++ days. A simple
> > solution to adress all available conventional memory with chunks larger
> > than 64K.
>
> I don't think Turbo C generates proper huge
> memory model code in its huge option. I think
> it just allows more than 64k for the DGROUP.

---
Visit my personal blog at https://www.javiergutierrezchamorro.com

kerravon

E-mail

Ligao, Free World North,
29.11.2022, 08:44

@ Guti

huge memory model

> Indeed no. Turbo C supported huge pointers allowing to allocate blocks
> larger than 64K.
>
> https://www.vogons.org/viewtopic.php?t=51678

That seems to require manually defining the
pointers as huge, which is not what I expect
to have to do when I pass "-mh" to the
compiler, and in fact, not what I have to do
when I use Watcom.

Watcom is doing exactly what I want.

Someone else with experience with programming
using huge memory model said that it only adds
a few percent overhead to runtime.

In my case, an OS, it shouldn't even be that,
because the computer should be bottlenecked in
the app, not the OS. And the app can be in any
memory model.

BFN. Paul.

Back to the board
Thread view  Mix view  Order
22632 Postings in 2109 Threads, 402 registered users, 480 users online (0 registered, 480 guests)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum