Hi!

> while he didn't specify a warning level, WCL doesn't even warn with
> -W=9 :-<  (watcom 1.9)

Wow...

>> In such case the halloc() & hfree() pair does seem to be the only way.

And those are deliberately kept separate from normal
memory allocation calls because of the bad access
performance for h-data structures...

> he explicitly wants 16-bit code, even 8086 compatible.
> no XMS, no protected mode available.

...

> note: huge model is hugely EXPENSIVE!

Indeed. Tom makes an important point here: Old compilers
have good reasons to warn about the cost of having data
structures or even memory models based on huge pointers
where 20 bit linear addresses are dynamically converted
to segment16:offset16 for every access.

It is a lot better to change your code to use several
memory blocks of less than 64k each and do the decision
which block to use when by hand. Your performance would
be really bad if you used a generic > 64k array for any
type of data accessed more often than "small parts once
in a long while" in real mode, 8086 compatible software.

Eric


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Freedos-devel mailing list
Freedos-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-devel

Reply via email to