Off Heap / no GC

  1. Is it possible to go off heap (similar to Java), that is manage your own memory in Go (without GC)?

  2. If yes, what is the api or the way to do it?


Have a look at
Short answer: No.


Sure you can. A simple google search gives lots of potential packages with different use cases:

The question is more “for what purpose” and “why”? :slight_smile:


I’m curious, is it possible to develop a “shim” layer for Go binary to operate as it is? I’m looking from TinyGo perspective to use Go for microcontroller. If those codes can be developed in Go, that would be nice. (Currently they are in embedded C).

EDIT: I would try to avoid hacking Go like TinyGo did to the heap memory part. It’s not easy to master memory mapping theorem.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.