Contents
Top of Page
General Information on the TERRA Compiler Versions
The Modula-2 Compilers version 3.41 have been derived
from the standard Logitech/MultiScope Modula-2 Compiler
3.40. As a key feature, the compilers version 3.41 are
year 2000 (Y2K) compliant, i.e. correct the year 2000
problems existing in version 3.40. These problems in general
may prevent successful linking, cause module "Overlay"
to report "version conflicts", and make debugging
of programs compiled in the year 2000 or later impossible.
In addition, the Large and Big version 3.41 compilers
optionally allows to display some statistics information
about table and memory usage during a compilation (see
option description below). These improvements were originally
developped by TERRA for the Large compiler version.
As a key feature, TERRA's Large and Big compiler versions
also include extended name tables, allowing to compile
larger programs, i.e. programs that consist of a large
number of modules and make use of a large number of identifiers.
Sizes of Critical Compiler Tables
Table |
Standard versions
M2C 3.40 & M2C 3.41/TESV
|
Large version
M2C 3.41/Large
|
Big version
M2C 3.41/Big
|
Identifier table (P1IdentSy.idtab) |
29'999
|
65'534
|
65'534 |
Hash table (P1IdentSy.htab) |
3'571
|
7'649
|
7'649 |
TypeRefFixup table (P4Refere.typeRefFixups) |
260 / 400
|
400
|
800 |
Procedure Code table (P4CodeSy.code) |
5'000
|
5'000
|
10'000 |
Statement table (P4CodeSy.statementInfo) |
1'000
|
1'000
|
2'000 |
Linker table (P4Li.linkTab) |
850
|
850
|
1'700 |
Forward Fixup table (P4Li.topBindTab) |
850
|
850
|
1'700 |
This table has been updated 24-Jan-2000.
In an earlier version of this document the values for M2C 3.41/Big
were not correct. However: all delivered versions of M2C 3.41/Big
delivered since 1998 support the enlarged tables!
The Large and Big compilers version 3.41 support the additional
option /MEMSTAT (default /NOMEMSTAT). If this option is
enabled, the compiler displays the size of the largest
memory block available from DOS at the end of each compiler
pass, as well as the sizes and the number of entries actually
used in the above three tables.
Top of Page
TERRA Enhanced Standard Compiler 3.41/TESV
Due to the corrections, the memory requirements of the
TERRA enhanced standard version 3.41/TESV of the compiler
(M2C and overlay version M2COMP) are expected to be slightly
higher than those of the corresponding original Logitech/MultiScope
compiler version 3.40.
TERRA recommends using the Large compiler instead of
the standard version, which usually prevents table and
memory overflows that may occur unexpectedly with the
standard version.
Top of Page
TERRA Large Compiler 3.41/Large
The TERRA Large compiler version 3.41/Large provides
enlarged tables as noted above, and at the same time has
been trimmed for minimal and economic memory usage.
The identifier and hash tables are allocated temporarily
during the compiler pass 1 only. Because memory usage
is much more critical during pass 4, the increase of these
tables does not increase the total memory needs of the
compiler.
Because some unnecessary variables have been removed,
and because the Large Linker options /OI, /OIO (optimize
init calls), and /K (keep procedures in base) have been
used to link the TERRA Large Compiler, its total memory
requirements are slightly smaller than those of the standard
3.40 and 3.41 versions.
The fully linked compiler M2C 3.41/Large needs about
1.3 KB less memory than the standard version M2C 3.40.
The overlay compiler M2COMP 3.41/Large needs about 3.8
KB less memory than the standard version M2COMP 3.40 (size
required for EXE and pass 4).
It has also been found, that in the standard version
3.40 of the compiler (as well as in version 3.40/L1) about
14 KB (12 KB) of the memory allocated to the identifier
and hash tables cannot be re-allocated later, because
the standard module "Storage" always allocates
memory from DOS in junks of 16000 bytes. By using a more
appropriate size for the hash table, as well as a version
of "Storage" that is able to allocate and use
smaller pieces of memory from DOS, this limitation has
been removed in the Large compiler version. The use of
this "Storage" module also enables the Large
compiler to finally allocate and use any remaining DOS
memory blocks that are smaller than 16000 bytes.
In consequence of the above, the Large version of the
compilers M2C and M2COMP virtually have access to about
16 to 32 KB more memory than the standard 3.40 and 3.41
versions. In the average, this corresponds to an increase
of about 10 percent for M2C, and of about 7 percent for
M2COMP with regard to the maximum amount of heap memory
available to the compiler.
Top of Page
TERRA Big Compiler 3.41/Big
The TERRA Big compiler version is based on the same source
modifications and uses the same table sizes as the Large
compiler. In addition, it has been built by means of the
DOS extender DOS/16M from Tenberry Software, Inc. The
Big compiler runs in protected mode and, therefore, has
access to the extended memory of the computer. Due to
this, only the fully linked version M2CB.EXE of the Big
compiler has been created (no overlay version).
Even if just a few MB's of extended memory are available,
using the Big compiler basically removes any practical
compilation memory limits. With the standard and Large
compiler versions such problems may arise when compiling
large modules or programs. These problems will usually
cause compilation to abort with the message "heap
overflow".
The Big compiler also uses an increased size for the
inter-pass files used internally by the compiler. In consequence,
the Big compiler truely allows to compile large modules
of up to 64 KB of code (processor limit). When compiling
such modules, the standard and Large compiler versions
usually abort with the message "maximum size for
interpass file reached: split your module".
The increased size of the Procedure Code Table allows
to translate procedures that had to be spilt up to several
smaller procedures in the past, thus destroying the logical
context of these procedures and causing programming overhead.
For all practical purposes, the Big compiler does not
impose any restrictions on the total size of the modules
and programs being compiled, except those that are implied
by the target processor and environment.
Top of Page |