3 ms·
Also, even on 64 bit machines, conservative GCs often just do a naive scan of the stack. And of uninitialized values on the heap. This means that garbage may be
by ori_b 7y ago
Also, even on 64 bit machines, conservative GCs often just do a naive scan of the stack. And of uninitialized values on the heap. This means that garbage may be treated as live.
Garbage often includes pointers that should no longer be live.
- compsciphd 7y agoI don't believe go can have uninitialized values. every variable has a default "zero value"
- aykevl 7y agoNot on the heap, but it can certainly have uninitialized variables on the stack. These cannot be created in normal Go code but the optimizer may decide to leave some values uninitialized when it determines that this is safe to do.