You can control this kind of stuff with TinyGo. It really has little in common with the normal Go runtime environment. On the other hand of course if you deactivate GC, you either have to live with higher overhead (pre-allocated data) or do some weird hacks. Well, probably it's up to you if they are weird. ;)
You do not want unnecessary memory allocations in the kernel — any memory allocated and unused by the kernel is not easy to free up when there’s a need for it. Also memory leaks. Also memory fragmentation. The kernel is intended to be stingy for stuff running in kernel space, so the userspace has access to as much as possible.
Whats up with adding lot of unnecessary setup complications by supporting languages that adds little to no value for something like kernel for namesake.
9
u/Thin_Dragonfruit2254 2d ago
It might have a usecase but "garbage-collected Go heap inside the kernel" is a bit concerning, no?
8
u/alpha417 2d ago
"Dont use in production"
welp, i dev in prod...so that settles it for me.
4
u/nhermosilla14 1d ago
I see a point to TinyGo, but I'm having a hard time seeing it here. Not every language is a systems language, and that's fine.
2
u/AngryFker 1d ago
this is mega dumb
1
u/This_Maintenance_834 4h ago
people cannot be serious enough to write kernel with language that uses garbage collection? is this a joke?
1
u/winelover97 2h ago
Whats up with adding lot of unnecessary setup complications by supporting languages that adds little to no value for something like kernel for namesake.