New slides about Go
Vladimir Panteleev
vladimir at thecybershadow.net
Thu Oct 14 16:15:28 PDT 2010
On Fri, 15 Oct 2010 02:04:59 +0300, bearophile <bearophileHUGS at lycos.com>
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 :-)
Calling C code should still be possible, but it will involve checking for
free space on the stack and preallocating as required. A possible
optimization is to use one "C stack" per thread (with the assumption that
there's no re-entry into our code from C code).
--
Best regards,
Vladimir mailto:vladimir at thecybershadow.net
More information about the Digitalmars-d
mailing list