New slides about Go
Walter Bright
newshound2 at digitalmars.com
Thu Oct 14 16:41:50 PDT 2010
bearophile wrote:
> Walter:
>
>> You can't call C code directly anymore.
>
> I don't know/understand why. Probably I just don't know how a segmented stack
> is implemented/structured.
>
> If the stack is growable, I presume there's some free space anyway at the end
> of it. So you are not forced to test for the stack length, so you may call a
> C function and hope it will not blow the free stack left. Probably I am
> wrong, but I don't know why :-)
Segmented stacks add a test in *every* function's prolog to test and see if the
stack is exhausted, and if so, switch to a new stack.
Exactly zero of C code does this.
So if you're near the end of your stack segment, and you call a C function, boom.
More information about the Digitalmars-d
mailing list