5 comments

  • rjgray1 hour ago
    I found <a href="https:&#x2F;&#x2F;nghiant3223.github.io&#x2F;2025&#x2F;06&#x2F;03&#x2F;memory_allocation_in_go.html" rel="nofollow">https:&#x2F;&#x2F;nghiant3223.github.io&#x2F;2025&#x2F;06&#x2F;03&#x2F;memory_allocation_i...</a> to be another excellent resource on this topic.
    • EdNutting1 hour ago
      You may also be interested in: <a href="https:&#x2F;&#x2F;go.dev&#x2F;blog&#x2F;greenteagc" rel="nofollow">https:&#x2F;&#x2F;go.dev&#x2F;blog&#x2F;greenteagc</a>
  • EdNutting1 hour ago
    See also: <a href="https:&#x2F;&#x2F;go.dev&#x2F;blog&#x2F;greenteagc" rel="nofollow">https:&#x2F;&#x2F;go.dev&#x2F;blog&#x2F;greenteagc</a>
  • jeffbee1 hour ago
    I don&#x27;t see why this would be of interest to anyone. It doesn&#x27;t introduce the topic with enough rigor to prepare someone to work on the runtime itself, and for everyone else it&#x27;s just trivia. I think if someone wanted to write an article like this of general interest they should focus on observable behaviors of the application, such as the fact that the Go allocator (like its cousin tcmalloc) uses prctl to set the name of its maps, so you can see low-level details of allocation behavior in &#x2F;proc&#x2F;smaps, and that it is automatically hugepage-aware, which can help reduce TLB misses, increasing IPC.
  • kitsune12 hours ago
    If an article starts with a generated image, I don&#x27;t read it. It&#x27;s a signal to me that&#x27;s it&#x27;s more likely the rest is generated too.
  • burntcaramel2 hours ago
    &gt; We said the runtime asks the OS for large chunks of memory. Those chunks are called arenas, and on most 64-bit systems each one is 64MB (4MB on Windows and 32-bit systems, 512KB on WebAssembly).<p>Incorrect. You ask the OS for pages. (Golang does internally appear to manage its heap into “arenas”.) On WebAssembly the page size is 64KiB. Window 64-bit it’s 4KiB, Apple Silicon 16KiB, Linux x86_64 4KiB.
    • mort961 hour ago
      &quot;Page&quot; is OS terminology. &quot;Arena&quot; is Go terminology. An arena is made up of sequential pages. Go asks the OS for 64MB of sequential memory, and calls that 64MB chunk an arena; this is consistent with the text you quoted. It is not incorrect.