News for hackers. Stuff that matters.
Re:Go Memory Management by de_Selby on Monday August 20, 2018 @08:03AM (#17799248)
Go programs are statically linked, you're referring to dynamic linking.
Re:Go Memory Management by Arkanosis on Monday August 20, 2018 @09:13AM (#17799617)
Actually, the libc is dynamically linked here, as shown in the /proc/maps section of the article.

So, to answer the GP: yes, resident memory from the libc ends up being amortized between all the processes that use it. But it doesn't even matter much as there's a mere 5 MiB of resident memory involved here. The “hundreds of MiB” are only of virtual memory, and that shouldn't be of any concern (see my other comment in this thread).

Re:Go Memory Management by zbentley on Monday August 20, 2018 @09:12AM (#17799608)
> Go programs are statically linked

Not necessarily true, unless you use strategies like the one suggested in the top level post above this. https://www.osso.nl/blog/golang-statically-linked/

In practice, those dependencies are ubiquitous enough that the "DLL hell" half of the dynamic-linking problem is avoided. The other issues (system-dependent behavior quirks, estimation from static libraries, linker caching, etc. etc.) remain in many cases.

Re:Go Memory Management by weberc2 on Monday August 20, 2018 @09:10AM (#17799591)
Go doesn’t statically link against libc; maybe it’s possible with the likes of musl, but in general, libc is dynamically linked.