[metapost] Metapost capacity exceeded

Taco Hoekwater taco at elvenkind.com
Tue Jun 1 18:07:08 CEST 2010


Nicola wrote:
> 
> But, regarding the current version, what are, or 
> where are documented, the numeric limits that are hard-coded? For 
> example, is it possible to have more than ~16K symbolic tokens defined 
> (that is the limit that I can reach in my tests)?

Not all internal limits are documented, in part because some
are completely fixed, in part because some are fluid, and in
part because nobody cared enough to find the actual max.

I think (but will not guarantee) that the current situation
for hard-code array values 1.2XX is like below:

Configurable:

* main_memory (overall memory)
   default is 50000,
   must be less than 0x10000000

* hash_size  (variable names and identifiers)
   default is 16384,
   max is 0x8000000

* param_size (simultaneous active parameters)
   default is 1500,
   hash_size+3*param_size must be less than 0x10000000

* max_in_open (simultaneous input levels)
   default is 25,
   must be less than about 65500 (but the operating system will
   allow much less than that in practice)

Not configurable:

* variable instances (the one you hit already)
   max is 33554431.

* expansion depth (for macros)
   max is 10000.

* sizes per font (for font objects belonging to figures)
   max is 65535.

* the various tfm generation parameters are limited by
   the tfm file format

And then there are the numeric limits that are documented
as part of the MetaPost language, of course (no variables
may be larger than 4095.999, no intermiate values larger
than 16383.9999, etc.).

Best wishes,
Taco




More information about the metapost mailing list