TinyMUX 2.2:  LIMITS
Last Update:  January 2003

While some limits of the server depend on the host environment (CPU
architecture, compiler, and operating system), there are certain univeral
limits, and we can also describe the typical limits on typical platforms.


The 8000 character limit:

Attribute values, global registers, function arguments, internal
intermediate buffers, and @mail bodies are typical limited to approximately
8000 characters.  However, you aren't always able to use the full 8000
characters because a null ('\0') character is needed at the end, ANSI
color codes require their own space, and for attributes, the owner and
attribute flags are encoded at the beginning of the buffer.  This effectively
reduces its usable size.


Object Limit:

The number of objects is limited to the maximum value on a 'int'.


Attribute Name Limit:

The number of unique attribute names is limited to the maximum value of a
'int'.


Attributes per Object:

In MUX 2.0, 2.1, and 2.2, the number of attributes that can be associated with
an object is limited to somewhere between 2666 and 4000 depending on the number
of unique attribute names game-wide and in particular which ones are used on
that particular object.  The total encoded size is limited to 8000 bytes, and
each attribute number is encoded into 1 to 5 bytes depending on its value.

  Attribute numbers between 1 and 127 can be encoded in 1 byte.
  Attribute numbers between 128 and 16383 can be encoded into 2 bytes.
  Attribute numbers between 16384 and 2097151 can be encoded into 3 bytes.
  Attribute numbers between 2097152 and 268435455 can be encoded into 4 bytes.
  The remaining attribute numbers can be encoded into 5 bytes.

A typical medium-sized game will not have more than 16383 unique attribute
names.  A typical large-sized game will not have anywhere near 2097151 unique
attribute names.


Range and precision of Dates:

MUX supports a proleptic Gregorian calendar with dates in the range of
'Sat Jan 01 00:00:00 -27256 UTC' through 'Thu Dec 31 23:59:59 30826 UTC'
which corresponds to -922283539200 through 910638979199.  The precision is
100 nanoseconds, and 0 (the epoch) corresponds to
'Sat Jan 01 00:00:00 1970 UTC'.

MUX does not account for leap seconds.  However, it does take into account
what is called 'Summer Time' or 'Daylight Savings Time'.  Given that the
operating system information about Daylight Savings Time is limited, MUX
does not apply DST for times that occur earlier the earliest information
provided by the operating system.  However, for times that occur after the
latest information provided by the operating system, MUX maps like years
to like years and borrows DST information from years that are within the
range supported by the operating system.


Typical Platform Limits:

A 'int' is typically 32-bits and can represent values from
-2147483648 through 2147483647.

Many platforms employ the IEEE floating-point formats. The range of
floating-point numbers which may be represented is approximately 1e-323
through 1e+308.

A 'long long' is typically 64-bits and can represent values from 
-9223372036854775808 to 9223372036854775807.  This it the internal
data type used for for mod(), remainder(), floordiv(), pack(), unpack(),
iadd(), isub(), imul(), and idiv().
