Controlling memory sizes

Originally {\manual META}{\manual FONT} (and TEX) is a {\smallcaps Pas\-cal} program not capable of dynamically controlling its memory allocation. Normally to change {\manual META}{\manual FONT}'s memory size you have to recompile the source code with changed internal settings. However, you need no longer fear the ``ask a wizard to enlarge me'' message, you can do some wizardry yourself! The present implementation is done with the help of the Web2C language converter and so it is possible to include a special feature for controlling the internal variables at runtime.

{\manual META}{\manual FONT} uses an extra path and environment variable MFCONFIG. (See section [*] for further details on the environment.) The Ini{\mc MF} and Vir{\mc MF} programs will search these directories for a file called mfmemory.config, which is expected to contain instructions, one per line, of the form

   set memmax       100000
   set screenheight    400
   set scalefactor       2
The example file given in the config directory `sets' what are my present standard configuration, slightly higher than the internal defaults. Not all settings need to be given in the file. Note that you can't just set everything to the maximum – that would require more than 8 Giga bytes of Fast{\mc RAM}!3

If you create a standard base file with Ini{\mc MF}, any change to the configuration mfmemory.config will be acceptable for Vir{\mc MF} in connection with this specific base, except changes to memtop. This will result in the {\manual META}{\manual FONT} message ``(Fatal base file error; I'm stymied),'' indicating that this base was produced with a different Ini{\mc MF}.

Here is a complete list of all parameters allowed in the configuration file, their internal defaults and some rules for their minimum and maximum values:

Setting Default Maximum Purpose
memmax 30000 maxhalfword Size of main storage
maxinternal 100 ≤259774 Number of internals
bufsize 500 maxhalfword Input characters
errorline 72 maxhalfword Error context width
halferrorline 42 <errline-15 First error line
maxprintline 79 ≥60 Output text line width
screenwidth 768 4095 Width of display screen
screenheight 1024 4095 Height of display screen
stacksize 30 300 Number of input sources
maxstrings 2000 maxhalfword Number of strings
poolsize 32000 maxhalfword Characters in strings
movesize 5000 10000 Storage for octant moves
maxwiggle 300 1000 Autorounded points per cycle
gfbufsize 100 4096 Size of the output buffer
pathsize 300 1000 Number of knots in a path
bistacksize 785 785 Stack for bisection algorithm
headersize 25 100 Number of {\mc TFM} header words
ligtablesize 5000 32510 Ligature/kern steps
maxkerns 500 1000 Distinct kerns
maxfontdimen 50 100 Number of `fontdimen's
memtop 30000 memmax Largest memory index
scalefactor 1 10 Display is `{\mc SF}' times reduced
maxinopen 6 20 Number of input files
paramsize 150 1000 Macro parameters
Some of these values are internally multiplied by a factor of 4 or 8, so the actual number of bytes needed for a specific setting is a little bit hard to describe. As long as you don't encounter problems, I recommend that you stick to the defaults or the standard configuration file provided with this package. In most cases of insufficient memory size, the only value to increase is memmax, and this was actually tested up to the horribly high value 750,000 on my Amiga 2000 with 8 {\mc MB} of 32 bit Fast{\mc RAM}.

You may control the size of the online display by changing the values for screenwidth, screenheight, and scalefactor. The meaning of the first two should be clear, just keep in mind, that screenheight denotes the interlaced setting, although non-interlaced screenmodes will automatically be detected and taken care of, i.e., only half as much pixel lines will actually be drawn. And the two values don't set the size of the window, but the respective innerwidth and innerheight. The scalefactor is a reduction factor, i.e., the online display will be reduced by this factor in both its width and height. To make sensible use of this feature, the plain.base provided with this package was compiled with the internal settings

   screen_rows:=4095; screen_cols:=4095; % infinity
defined in the printer modes file. When drawing on screen {\manual META}{\manual FONT} uses the smaller value of screenheight and screen_rows respectively screenwidth and screen_cols, so actually the configuration overrides the internal settings.