Re: Problem compiling WorldClass with TADS 2.2 on a Mac


27 May 1995 18:40:14 -0700

dmb@rice-chex.ai.mit.edu (David Baggett) writes:

> Jim Menard <jmenard@bbn.com> wrote:

>>I'm trying to compile the test game that comes with WorldClass. I keep
>>getting the error
>>
>> world.t(4032): error TADS-11: fatal: no memory, even after swapping/garbage
>> collection

>For some reason the TADS compiler must not be getting enough memory. How
>much memory does your Mac have? You should be able to compile TEST.T with
>a meg of memory --- certainly with two megs.

>You might try turning off virtual memory if you have it on. I've gotten
>the impression that Mac virtual memory tends to make some things fail.

>Maybe our resident TADS/Mac guru, Neil Guy, can shed some light on this.

Guru? How flattering! I've never been called that before! Guess I
feel obliged to try and answer the question now. :)

I've seen that error before also. As Dave says it's a memory thing,
and there are a number of ways I have managed to banish it. (I've
never seen virtual memory affecting this problem one way or the other
though.)

1) Increase the amount of memory allocated to the compiler
application. Take it to the largest amount you can spare on your
machine. I just bumped up the compiler memory to 4.5 Mb and left it
there. I'm sure it doesn't have to be anywhere near that big; I just
haven't bothered to figure out what the smallest size is. Won't it be
nice when Copland (System 8) comes and we won't have to mess around
with this partition nonsense?

2) Increase the size of the parse memory pool. I compile my whole game,
which is much bigger than just the WorldClass libraries, with a parse
memory pool of 24000 bytes. Again, I'm sure it can be smaller but I've
never bothered to figure out what's the optimal size.

3) Turn off the "Generate debugging information" option. This has
sort of solved the problem for me in the past. Of course the downside
is you won't be able to debug your game using the TADS debugger if you
go this route...

4) Finally, you can do what I had to do in order to get my game to
compile. And that is to split the largest object into two. In my
source the "thing" object ended up being so huge, containing so many
lines of code, that the compiler couldn't handle it. I ended up taking
half the code out of the "thing" object and putting it into the "item"
object instead.

Since every manipulable object in the game inherits its properties
from "item" and not "thing" directly this works fine. And since TADS
is fully object-oriented, everything inherits the necessary methods
quite nicely.

I doubt you'll have to resort to suggestions 3 or 4 since WorldClass
isn't *that* big. Suggestions 1 and 2 should solve the problem.
Hopefully!

- Neil K.

-- 
  49N 16' 123W 7'  /  Vancouver, BC, Canada  /  n_k_guy@sfu.ca