[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Expanding KCL and AKCL



KCL and AKCL, when built, have a fixed upper bound that limits the
total amount of space that can be dynamically allocated.  To increase
this limit, you need to rebuild the Lisp.  The following remarks by
Bill Schelter describe this process.  (This may all be obvious to
those experienced both with C and KCL, but I thank Bill for spelling
it all out in big letters for people like me.)

All cells on a given data page are of the same size.  Some data pages
contain relocatable array bodies, and others non relocatable array or
compiled function bodies.  A record of which page contains what is
kept in a table.  The size of this table is fixed at compile time.  In
order to increase it, change the definition of MAXPAGE, eg:

#define MAXPAGE 32000

For bsd systems [eg sun] this definition occurs in the file h/bsd.h
In some cases it may be overridden in a particular machine's .h file.

You then do

% cd akcl
% rm o/*.o
% make

in the main directory.

All the o/*.o files should be recompiled because of the change (since
this table is a common array, and the linker wants all files to think
it is the same size).  We do rm o/*.o to make sure this happens.

The above change allows up to (MAXPAGE * 2048) bytes of storage.
Of course there are other limits imposed by your system, such
as the amount of swap space, and limits on the datasize for a
process.   You may need to increase the latter using limit or
unlimit at the shell level.

Only 1 byte is required for each page, so the above table will use
only 32000 bytes.   However it is obviously wasteful to make
it larger than will ever be used.   

Within a KCL or AKCL, (room t) will print out, at the end, the maximum
number of pages for that load-up.