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]

Re: gh_enter reconsidered


> Not quite - it's possible to put a pointer to a user-allocated string
> in environ using putenv or setenv, for instance.

Hmmm, should the garbage collector really decide to take responsibility
for the environment strings? I feel that's treading on the toes of system
libraries too much.

> > In my humble opinion, guile should attempt to scan as LITTLE of the
> > stack as possible rather than as MUCH as possible. Just do the job that
> > has to be done. Make clear to the user that the amount of code they hand
> > over into guile's care represents the amount of protection they get but
> > GIVE THE USER THE CHOICE.
> > 
> 
> Do you mean the user has to explicitly ask for stack protection for
> ranges he cares about, instead of letting Guile find the top of the
> stack? To me that sounds too close to going back to the bad old days
> of having to explicilty protect all values on the stack.

No, I mean the user can choose the top of the scan, the bottom of the
scan is always the current stack pointer and there are no sub-ranges.
The user chooses the top of the scan by entering some function that is
similar to gh_enter(), when that function returns, the user promises
not to manipulate SCM variables until they call that function again
(SCM top-level symbols just sit around in the meantime).

It comes down to one single number which is the stack top and that
is hardly comparable to marking out ranges or flagging each value explicitly.

	- Tel