Out of memory?

I have around 500 indexed texts in 4 tables that I’m using as a verb dictionary.

I’m getting an error that I hit a memory limit. I’ve fixed this for now by simply tacking on zeros after my first line.

Use MAX_STATIC_DATA of 10000000.

It was, I think, 18000 originally.
Now, I have another 300 or so items I need to add, and I actually haven’t made a game yet… just working on the parser. However, that number is looking really creepy. What is that by the way? Bytes? (When I run the task manager, it says inform 7 is taking up 41 MB with the game running)

Am I going to have problems later?

==== EDIT ====
I’m assuming that the number is bytes, So I made it an even 16mb of data.

Use MAX_STATIC_DATA of 16777216.

I guess the question is, why do I need 16mb of data to hold 500 text strings?

That number is in bytes. It refers to memory set aside in the I6 compiler for storing arrays. (You’re not going to see it in the task manager, because the I6 compiler executes only briefly during each I7 compile.)

If you’re using a computer made in the last decade, you’re not going to notice the additional compilation overhead caused by increasing these settings.

On the other hand, the way you’re going about this is probably not optimal. When you define 500 indexed texts, the I7 compiler reserves a lot of extra space, because it assumes you’re going to be operating on all of them. But it sounds like they’re all really static data. So it might be better to store 500 normal texts, and convert them to indexed text as needed.

On the third hand, that would be trading off speed for tighter memory usage. Memory is probably cheaper to waste than CPU time, particularly on a browser interpreter. So by that logic you should ignore what I just said. :slight_smile:

In the end I’m probably going to be making my own terp when ALL is said and done, this is most defiantly not going to be a browser game.
If it’s just a compiler issue I will make due then. I really don’t want to quit my game idea because I hit a limit on the tool and have to start over with another language.

I had a very similar problem in my first large compiles using Inform 7, and the solution was to convert as many data structures as possible into tables.

I think about writing my own interpreter very, very often, for transmedia purposes. But there is so much effort being done already; and they are so open to suggestions…

Tables huh?
Linked for huge picture

Got that covered :slight_smile:

Ha ha, wow.

The next version of Inform will help a lot as it is combining the two types of text together.

Yeah, I guess that will make the choice of indexed-vs-normal text moot.