News for hackers. Stuff that matters.
Re:Three kinds of memory leaks by gus_massa on Monday April 30, 2018 @10:47PM (#16964255)
IIRC the golang GC has a similar behavior, because it is a non-moving GC, so it is very fast and C-friendly.

IIRC Java and C# have a moving GC, so the GC may decide to move the object and will update all the references to make the change automatic. This is slower and you can't pass the pointers to an external function that is not aware of the GC. But the memory is compacted and it avoids the #3 type of leaks, and also allocating new memory is faster because the allocator has a big block of free memory instead of having to lookup a good place in the fragmented free memory.

There are no comments on this comment yet.