Memory settings

Hello hello

Does exist a complete list of all the memory settings that you can change ?

And more precisely is there a memory setting , concerning the total length of a code (source code + extensions) ?

The list of memory settings is in the I6 compiler. Look at … r/memory.c , find the explain_parameter() function, you can read through it.

(Some of these are compiler options which are not about memory size.)

There is no single limit on the size of your source code. It’s compiled one object or function at a time; the compiler doesn’t keep it all in memory at once.

Mostly you don’t have to worry about it until you run into an error report that tells you to raise a specific option.

1 Like

Thanks for the list !

I couldn’t compile yesterday, the simple fact of adding one object, even one line of description for an existing object, procuced a " code 10 ". And it annoyes me a lot not to understand why …

Another strange thing : even when the game compiles fine on my PC, it doesn’t at all on my mother’s computer (a horrible ACER with Vista and 1 GB Ram) , unless I shut down all other programs. So I believed that the compiler needed tons of RAM to work.

When you get a problem like a “code 10” message, it can help to look at the “Progress panel” of the “Errors” tab, which shows the raw output from the compilers. If the error message is not explanatory, post it here.

Here what I get today :

My current memory settings :

(i am aware that some of these values may be absolutely too huge, but i don’t know where a happy medium is)

The code 10 means that Inform 6 has crashed, which shouldn’t happen (but does). Work has been done (by Zarf) on Inform 6 to make it handle such cases more gracefully and hopefully print an error rather than crashing that will be in the next build, but that doesn’t help you much.

If you email me the project I can have a look at figuring out why Inform 6 is crashing.

You could try installing the latest I6 version into your I7 IDE, and see if the crash has already been fixed. (Although you’ll have to get David to supply you a current Windows build.)

Don’t set GLULX_OBJECT_EXT_BYTES, by the way. That just bloats up your game file for no reason.

Actually, after you figure this out, you should remove all of those Use declarations.

1 Like

Wow, installing the last I6 ? i didn’t know it was possible and actually I don’t how to do …

DavidK : thank you very much for your proposal but my project is huge (a “short” source code + almost 120 personnal extensions, not counting the other extensions) and I can’t waste your time with that.

Nonetheless I can tell you that : there is a memory setting, i can’t remember which one, maybe MAX_PROP_TABLE_SIZE (not sure) - when too low, the compiler asks me to increase it. But if I increase it , and not enough, i have a code 10 without explanations. If I increase it enough, the game compiles. Uneasy to find where problems are with this kind of subtilities !

I’ve run into this one over and over again with a large project. There are a limit of objects for each class. I don’t exactly know what the limits are, but there are a limit of rooms, persons, and things. If you’re running into this, try commenting out sections that feature objects until you get a clean compile, then go step by step back until you see where the system breaks – and you’ll have your answer as to what’s breaking it.

As a solution to this, I’m using a recycling method for objects. My mental image of this is a stage, with limited space and actors to fill the roles. If you run out of objects, you can change the “stage” of a room dynamically, or change the description, or “costume” of a character.

Hope this helps. I’m not sure how a large scale project can be done, otherwise, but I’m sure there’s lots of methods out there. This one has been working for me.

There’s one more solution, or workaround I’ve found to get around this issue. I made the mistake of branching my enemy classes alongside my NPC classes, so that I didn’t have to duplicate the functions for each. So I gave them the same parent class. Now, I’m bumping into this same problem on creating new NPCs. I believe that by creating new classes, then you can increase the amount of objects for that given class. I haven’t made this update, yet, but this has worked for all other elements in my system. When you create a new class from a parent object, you get that many more objects to create underneath that class. I can explain this further if you want me to.

Right. This was bug 603. The code-10 error is fixed in the next release. With that version there’s no limit to the number of objects, although the game may become slow if you have a whole lot.

If you know how to compile a command-line tool, download the I6 source from , compile it, and copy the binary over Compilers/inform-6.32-biplatform in your I7 package.

Wow – that is really good news. Even if there’s no cap, I still think it’s good to recycle objects if possible to avoid the slow-down issue. That makes a huge difference moving forward with any larger scale projects.

In case you try this: on Windows, that’s “Compilers/inform-632.exe”.

@zarf or DavidK:

Okay, I’ve downloaded the source – but I’m not sure how to compile this. I have Windows 7 64bit – but the 32 version should work. Do I run this from the command line, or is this some kind of zip file? (I understand the overwriting part. :smiley:)

Thanks to you all !

I’ll try this new compiler. If my own brain can compile the instructions :mrgreen: (actually i don’t know at all how to “compile a command-line tool”)

I tried to (cross)-compile it from my linux computer. I think it should work on Windows (wine tells me it can start, at least).
Here is the binary:

If you want to try to compile Inform 6 on Windows, you’ll need a C compiler. The simplest way to get this is to install MinGW from which provides an installation of the GCC compilers. Given that, from a command prompt, you would go to the directory containing the .c files from GitHub, and compile them with

gcc -o i6 -DPC_WIN32 *.c

If that works, it will produce an “i6.exe” executable in the same directory, which is your Inform 6 executable.

Funny, with your new compiler, Farvardin, I have a new error message (line 250520: Fatal error: The memory setting SYMBOLS_CHUNK_SIZE (which is 5000 at present) has been exceeded. Try running Inform again with $SYMBOLS_CHUNK_SIZE= on the command line.) , when it worked with the ancient one.

The first time I compiled it with only this: /usr/bin/i586-mingw32msvc-cc *.c -o inform.exe (since there is no makefile)

I’ve compiled it again with your specific flag, it might be important (I know almost nothing about C, except how to run a configure and makefile):

note: The setting $MAX_CLASS_TABLE_SIZE, which was not used anywhere, has been removed. [Mantis 612], cf … Notes.html

For what it’s worth, my current very large game has had to set

Use MAX_OBJECTS of 1000.
Use MAX_SYMBOLS of 30000.
Use MAX_PROP_TABLE_SIZE of 500000.
Use MAX_LABELS of 30000.
Use ALLOC_CHUNK_SIZE of 32768.

Again, once you have have your game compiling correctly, remove any memory settings that you aren’t sure of. Some of them affect game compilation in various ways, and if you don’t understand a setting, you don’t want it.