On Tue, 15 Jul 2003, Mauricio FernŠŌdez wrote:
> On Tue, Jul 15, 2003 at 01:26:43AM +0900, Mathieu Bouchard wrote:
> > On Sun, 13 Jul 2003, Mathieu Bouchard wrote:
> > As an explanation for the code snippet: I want to find the bottom of the
> > stack, to tell Init_stack about it, because it can't find it by itself; i
> > could use (VALUE *)0xBFFFFFFC, but I want to be a bit more
> > system-independant than that... Is there a quicker, systematic way of
> > finding the bottom of the stack?
> If you pass NULL Ruby will take the address of a variable in the stack,
> hence recording the bottom of the stack _at that point in time_.

you mean recording the top of the system stack, and using it as a bottom
of the stack, beyond which ruby will not check for VALUEs.

> You can ensure things will work OK by calling Init_stack at the
> beginning of every access point (function called by the main program).

Interesting. This would work for me; however it would still be convenient
to not have to rely on modifying every access point.

________________________________________________________________
Mathieu Bouchard                       http://artengine.ca/matju