]> Cypherpunks repositories - gostls13.git/commit
runtime: initialize the memory limit in mallocinit
authorMichael Anthony Knyszek <mknyszek@google.com>
Fri, 11 Nov 2022 22:16:20 +0000 (22:16 +0000)
committerGopher Robot <gobot@golang.org>
Wed, 5 Apr 2023 21:45:22 +0000 (21:45 +0000)
commit96e8e62821ddb862e947fc9a1609e8e5b713cf14
tree49719658a02d9243d938ff4b07a8599cab607a61
parent84eaceaba706f55ed750149fcfbd6e59c78d60d8
runtime: initialize the memory limit in mallocinit

Currently the memory limit is left uninitialized before gcinit, and
allocations may happen. The result is that the span allocation path
might try to scavenge memory unnecessarily. Prevent this by setting the
memory limit up early to its default value.

Change-Id: I886d9a8fa645861e4f88e0d54af793418426f520
Reviewed-on: https://go-review.googlesource.com/c/go/+/450736
Run-TryBot: Michael Knyszek <mknyszek@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Michael Knyszek <mknyszek@google.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
src/runtime/malloc.go