From 6ab2a357b50a7b318f09685d53d54197ac4cacf8 Mon Sep 17 00:00:00 2001 From: Nick Ripley <97066770+nsrip-dd@users.noreply.github.com> Date: Tue, 20 Sep 2022 04:03:21 -0400 Subject: [PATCH] Add reference to the official Go GC guide (#19) --- guide/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/guide/README.md b/guide/README.md index ce708f7..16b00b3 100644 --- a/guide/README.md +++ b/guide/README.md @@ -64,6 +64,8 @@ However, the model above should be sufficient to understand the remainder of thi The other major abstraction in Go is the garbage collector. In languages like C, the programmer needs to manually deal with allocating and releasing memory using `malloc()` and `free()`. This offers great control, but turns out to be very error prone in practice. A garbage collector can reduce this burden, but the automatic management of memory can easily become a performance bottleneck. This section of the guide will present a simple model for Go's GC that should be useful for identifying and optimizing memory management related problems. +For a more in-depth guide on Go's GC, refer to the [official documentation](https://go.dev/doc/gc-guide). + #### The Stack Let's start with the basics. Go can allocate memory in one of two places, the stack or the heap. Each goroutine has its own stack which is a contiguous area of memory. Additionally there is a big area of memory shared between goroutines that is called the heap. This can be seen in the picture below.