[comp.lang.c++] Zortech C++ Version 2.1

rozin@unix.cis.pitt.edu (R Rozin) (06/27/90)

I just received an upgrade order form from Zortech, for version 2.1. 
Two of the advertised new features which seem unclear to me are:

    1. Virtual code manager, which is supposed to let you write programs
       up to 4 megabytes in size in real mode.

    2. Rational systems Dos extender, which is supposed to let you write
       proprams which access memory beyond 640k.

If you have 1., why would you need 2.?  Does anyone know more about these
features?  Would they let you write programs whose data is about 2-3 mbytes,
without worrying about expanded memory, and without using the __handle?
How does it compare to the facility of Turbo C++ which provides virtual
memory (in a way)?

Roman Rozin

joe@quanta.eng.ohio-state.edu (Joseph T. Rohde) (06/27/90)

In article <25252@unix.cis.pitt.edu> rozin@unix.cis.pitt.edu (R Rozin) writes:
>    1. Virtual code manager, which is supposed to let you write programs
>       up to 4 megabytes in size in real mode.
>    2. Rational systems Dos extender, which is supposed to let you write
>       proprams which access memory beyond 640k.
>
Someone wrote about all this earlier, but I believe the basic idea is this:

Up to a 4Mb code segment, and a ?Mb data segment.  The important thing about
(1) is that it allows the code segment to grow past the 640K.  It probably
does this with soem type of built in swapping??  And this method is not usable
for the data segment, or at least not for dynamic allocation.

Just my guess, and I hope it's accurate so I don't get flamed to death :-)

Joe
-- 
:--------------------  rohde@eng.ohio-state.edu  ------------------:
:    He's dead Jim, you get his tri-corder, I'll get his wallet    :
:------------------------------------------------------------------:

joe@proto.COM (Joe Huffman) (06/29/90)

In article <25252@unix.cis.pitt.edu>, rozin@unix.cis.pitt.edu (R Rozin) writes:
> 
> I just received an upgrade order form from Zortech, for version 2.1. 
> Two of the advertised new features which seem unclear to me are:
> 
>     1. Virtual code manager, which is supposed to let you write programs
>        up to 4 megabytes in size in real mode.
> 
>     2. Rational systems Dos extender, which is supposed to let you write
>        proprams which access memory beyond 640k.
> 
> If you have 1., why would you need 2.?  Does anyone know more about these

There is some runtime overhead with the VCM, see 'Virtual Memory For 640K DOS'
by Walter Bright in the July 1990 issue of 'The C Users Journal'.  Depending
on your application it may be unacceptable.

> features?  Would they let you write programs whose data is about 2-3 mbytes,
> without worrying about expanded memory, and without using the __handle?

VCM doesn't overlay data, so the answer is no for VCM.  As for the Rational
Systems I believe the answer is as follows:  You can malloc (standard malloc,
not handle_malloc()) as many blocks of (up to 64K in size) memory as you want
until you run out of extended memory.  So the answer is yes if you can break
the data up into blocks of < 64k.

> How does it compare to the facility of Turbo C++ which provides virtual
> memory (in a way)?

VROOM?  Walter says (paraphrased and toned down from a private conversation) 
that VCM is better.  Of course he wrote it, so consider the potential for
bias.


-- 
joe@proto.com
uunet!proto!joe
FAX: 208-263-8772

bagpiper@mcosm.uucp (06/29/90)

In article <25252@unix.cis.pitt.edu>, rozin@unix.cis.pitt.edu (R Rozin) writes:
> I just received an upgrade order form from Zortech, for version 2.1. 
> Two of the advertised new features which seem unclear to me are:
> 
>     1. Virtual code manager, which is supposed to let you write programs
>        up to 4 megabytes in size in real mode.
As I understand it, you can compiler your program so that you basically
don't have to worry about primary memory constraints.  Walter has somehow
set up the compiler/linker so that code/data is swapped out if is not
needed so that other code/data can be swapped in.  I would like to hear more
about this from Mr. Bright!
> 
>     2. Rational systems Dos extender, which is supposed to let you write
>        proprams which access memory beyond 640k.
The Rational systems DOS extender is not included..the Zortech compiler
makes user of the extender to allow you to use extended memory in your
286/386/486 machine.  This does not mean that you can utilize the 
DOS extender for you own use.
> Roman Rozin
 
-------------------------------------------------------------------------------
+           Michael Hunter  {backbone}!hacgate!trwind!mcosm!bagpiper          +
+                                 BIX:bagpiper                                +
+               NOTHING like a spacecraft with a bad attitude!!!              +
-------------------------------------------------------------------------------

bright@Data-IO.COM (Walter Bright) (06/30/90)

In article <25252@unix.cis.pitt.edu> rozin@unix.cis.pitt.edu (R Rozin) writes:
<I just received an upgrade order form from Zortech, for version 2.1. 
<Two of the advertised new features which seem unclear to me are:
<    1. Virtual code manager, which is supposed to let you write programs
<       up to 4 megabytes in size in real mode.
<    2. Rational systems Dos extender, which is supposed to let you write
<       proprams which access memory beyond 640k.
<If you have 1., why would you need 2.?  Does anyone know more about these
<features?  Would they let you write programs whose data is about 2-3 mbytes,
<without worrying about expanded memory, and without using the __handle?
<How does it compare to the facility of Turbo C++ which provides virtual
<memory (in a way)?

VCM is really a 'software virtual memory' system. Code segments are swapped
in and out of memory as needed. VCM programs run in real mode (and will work
on 8088 machines). VCM does not virtualize data, data is still restricted
to 640k. For a complete technical description of how VCM works, I wrote an
article about it for the July C Programmers Journal.

DOS extenders work in protected mode, and can directly access up to 16 mb of
code and data. A DOS extender app will run much faster than a VCM app, but
requires a 286/386. Building a DOS extender app also requires that you
obtain the DOS extender itself from Rational Systems.

VCM is similar to Borland's VROOM. One difference is that in VROOM, you must
set aside a 'swap space' for the code segments. With VCM, this is not
necessary, as VCM actually calls malloc to get memory for a code segment.
When malloc runs out of memory, it calls the VCM manager to discard code
segments.

I have not seen a technical description of how VROOM works, nor has Borland
shipped me TC++ yet, so I am not positive about how it works.

bright@Data-IO.COM (Walter Bright) (06/30/90)

In article <79@mcosm.uucp> bagpiper@mcosm.uucp writes:
>In article <25252@unix.cis.pitt.edu>, rozin@unix.cis.pitt.edu (R Rozin) writes:
<< I just received an upgrade order form from Zortech, for version 2.1. 
<<     1. Virtual code manager, which is supposed to let you write programs
<<        up to 4 megabytes in size in real mode.
<As I understand it, you can compiler your program so that you basically
<don't have to worry about primary memory constraints.  Walter has somehow
<set up the compiler/linker so that code/data is swapped out if is not
<needed so that other code/data can be swapped in.

Data is not swapped with VCM, only code is. You can swap data if you use
__handle pointers and EMS.

<<     2. Rational systems Dos extender, which is supposed to let you write
<<        proprams which access memory beyond 640k.
<The Rational systems DOS extender is not included..the Zortech compiler
<makes user of the extender to allow you to use extended memory in your
<286/386/486 machine.  This does not mean that you can utilize the 
<DOS extender for you own use.

To develop DOS extender apps, you'll need the DOS extender from Rational
Systems. However, it is 'plug and go', you'll not need to patch the
libraries or otherwise mess around with the compiler to get it to
work with the DOS extender. The FG graphics libraries also work right
out of the box with the DOS extender.

bagpiper@mcosm.uucp (06/30/90)

In article <79@mcosm.uucp>, bagpiper@mcosm.uucp writes:
> In article <25252@unix.cis.pitt.edu>, rozin@unix.cis.pitt.edu (R Rozin) writes:
>> I just received an upgrade order form from Zortech, for version 2.1. 
>> Two of the advertised new features which seem unclear to me are:
>> 
>>     1. Virtual code manager, which is supposed to let you write programs
>>        up to 4 megabytes in size in real mode.
> As I understand it, you can compiler your program so that you basically
> don't have to worry about primary memory constraints.  Walter has somehow
> set up the compiler/linker so that code/data is swapped out if is not
> needed so that other code/data can be swapped in.  I would like to hear more
> about this from Mr. Bright!
Someday I will learn to wait a few breaths!!  I got home to find a 
"C Users J" in my mail box with a great article by Mr. Bright!!!

-------------------------------------------------------------------------------
+           Michael Hunter  {backbone}!hacgate!trwind!mcosm!bagpiper          +
+                                 BIX:bagpiper                                +
+               NOTHING like a spacecraft with a bad attitude!!!              +
-------------------------------------------------------------------------------

marc@dumbcat.sf.ca.us (Marco S Hyman) (06/30/90)

In article <25252@unix.cis.pitt.edu> rozin@unix.cis.pitt.edu (R Rozin) writes:
    
    I just received an upgrade order form from Zortech, for version 2.1. 
    Two of the advertised new features which seem unclear to me are:
    
        1. Virtual code manager, which is supposed to let you write programs
           up to 4 megabytes in size in real mode.
    
        2. Rational systems Dos extender, which is supposed to let you write
           proprams which access memory beyond 640k.
    
    If you have 1., why would you need 2.?

The issues are orthogonal.

1. allows you to write big programs.  Like most (all?) virtual memory systems
that which can't fit in memory resides on disk.  Your still limited to the
640K of memory that the PC (_NOT DOS_)* limits you to, in that only 640K
(less system overhead) can be resident at any given time.  Swapping from
disk can be S L O W !

2. allows you to use the memory above the 640K PC limit.  I assume it
requires a 286 or 386, but could be wrong.  Having more memory means less
swapping (or swapping from memory to memory) which makes your big program
run faster.

// marc
-- 
// marc@dumbcat.sf.ca.us
// {ames,decwrl,sun}!pacbell!dumbcat!marc

Bob.Stout@p6.f506.n106.z1.fidonet.org (Bob Stout) (06/30/90)

  ZTC++ 2.1 VCM is described by Walter in this month's C Users Journal. It is 
quite similar in concept to the TC++ VROOMM, but appears to be a cleaner 
implementation. Both are automatic overlay management schemes which use a LRU 
algorithm to determine when to swap code out to disk. VCM is implemented as a 
new memory model while VROOMM is simply another module to link in. Where VCM 
picks up its edge is that it shares memory with the heap, so that virtual code 
and coexist peacefully with dynamically allocated data memory. VROOMM, on the 
other hand, uses a static swap area whose size you define at compile/link 
time. Neither system overlays data, although Walter's __handle pointers 
provide a means of automatically using EMM for virtual data memory.

  The Rational Systems DOS extender support permits PC's using a 80286 or 
better to run code in protected mode. The difference between this and VCM is 
that one scheme swaps code in and out of overlays while the other simply 
provides more RAM space in which to load the code in the first place.