3 ms·
> How does one implement malloc in C? It's unrelated this one. C the language does not depend on malloc being present, whereas the GC is part of the language
by gkya 10y ago
> How does one implement malloc in C?
It's unrelated this one. C the language does not depend on malloc being present, whereas the GC is part of the language in Go.
The important thing for the grandparent comment is that Go is not interpreted, but compiled. Thus when the Go compiler (i) is being compiled by another Go compiler (ii), the (i)'s own GC code is not utilised, but the already-compiled (ii)'s one is used. After that it's all machine code.