Memory limits...

Okay, I have reached nearly 70,000 words in my source code, and hit a memory limit called MAX_STATIC_DATA. I had to raise it to 200000. It was originally at 180000, and crashed after my first compile yesterday. I then raised it to 190000. It crashed again(well, with a polite note to look at ‘console’ for the precise kind of limit I hit). Then I raised it to 200000, and it compiled successfully. What kind of memory limit is this–is this about numeric variables(I do have a lot of them), Every turn rules(a lot of them, too)…?? Am I to expect to hit this or other memory limits as I continue to add to my game? I am about to reach the end of the game, but I expect to do more editing and perhaps adding more to it before I release it.

MAX_STATIC_DATA is temporary storage for I6 arrays during compilation. I6 arrays are used for a great many things in the Inform ecosystem – I7 table storage, string-manipulation workspace, map connections, many-to-many relation tables. So it’s hard (and not usually interesting) to track down exactly what caused it to reach a particular limit.

When you get this error, it’s easiest to double the value rather than bumping it up incrementally. That way you probably won’t see it again for a while.

(Increasing MAX_STATIC_DATA value does not affect the composition of the compiled game file. It only affects whether you can finish compiling it.)

Thanks, Zarf, I think I’ll do that.

As it gets bigger, you’ll start to hit a whole bunch of storage variable limits. These are the most likely - these are the values I used when a project gets very large:
Use MAX_STATIC_DATA of 1500000.
Use MAX_SYMBOLS of 50000.
Use MAX_OBJECTS of 1500.
Use MAX_PROP_TABLE_SIZE of 500000.
Use MAX_ARRAYS of 25000.
Use dynamic memory allocation of at least 32768.
Use maximum things understood at once of at least 400.


The last two of those do affect the game file – they cause Inform to allocate more array space for runtime work.