Go nearly had Arenas a few years ago. And I think they are still used in Google.
But they were pulled because the polluted the API's of too many libraries.
See https://github.com/golang/go/issues/51317On Thursday, 27 February 2025 at 07:55:27 UTC will....@gmail.com wrote:I recently recalled that someone in the Go Team—I forget who—said that the Go compiler slowed down a lot after converting from C to Go because the Go GC was freeing a lot of memory that the C code wasn't.I wonder if an approach like that of memory regions (https://github.com/golang/go/discussions/70257) could be used to hint to the GC that memory allocated in a function doesn't need to be freed unless there is severe memory pressure.
For example (for lack of a better name):func main() {runtime.DeferCollection(func() {runCommand()})}Will
--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/golang-nuts/2ebe77c1-7d62-4e5f-b300-1165e99cd477n%40googlegroups.com.
You received this message because you are subscribed to a topic in the Google Groups "golang-nuts" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/golang-nuts/QT_fp-FqAVM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to golang-nuts...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/golang-nuts/CALoThU_1qcONrXA_%3DDK11RBvJqEez6BMHKOZEBXtexmrbXXdpQ%40mail.gmail.com.
On Feb 27, 2025, at 5:39 PM, Will Faught <wi...@willfaught.com> wrote:
To view this discussion visit https://groups.google.com/d/msgid/golang-nuts/CAKbcuKj43NTWS5UFgFcuYpHU%3D20Z_%2B7fbNAOFAVDgPKn6mZ7kw%40mail.gmail.com.
On Feb 27, 2025, at 5:47 PM, Robert Engels <ren...@ix.netcom.com> wrote:
On Feb 27, 2025, at 5:51 PM, Robert Engels <ren...@ix.netcom.com> wrote:
To view this discussion visit https://groups.google.com/d/msgid/golang-nuts/3B2684AE-4E0F-4687-8EE1-C16A115DFBE5%40ix.netcom.com.