4 ms·
I wonder if they attempted manual memory allocation in Go? In many languages with GC you can actually do manual memory management relatively easily with few he
by nabla9 7y ago
I wonder if they attempted manual memory allocation in Go?
In many languages with GC you can actually do manual memory management relatively easily with few helper functions. You write your own allocate() and free() functions/methods. When you allocate, you check the free list first, if nothing is available, you do normal allocation. When you call free you add the object into a free list. If you memory management leaks, it triggers GC.
Usually you need to do that kind of stuff to only in few places and few data structures to cut GC 90%.