This is the mail archive of the guile@cygnus.com mailing list for the guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

How to measure the size of the stack


There are two stack limits in Guile:

1. The stack check limit which is used when debugging programs to
   detect when the stack grows too large.  It is one of the
   `debug-options'.

2. The amount of memory allocated for the stack when spawning new
   threads.  It is in `eval-options'.

Silly me have chosen to measure the first limit in words and the
second in bytes.

We should of course be consistent.

Which measure is best?

The advantage of the word measure is that it will be invariant between
32 and 64 bit machines This means that although your program will use
approximately the double amount of stack on a 64 bit machine, you
won't need to use different settings on these two classes of
architectures.

The advantage of the byte measure is of course that people are used to
it.

Please comment on this.

Which measure should we choose?  (I prefer words myself because of the
invarians.)

/mdj