diff options
| author | Keith Randall <khr@golang.org> | 2025-07-21 13:37:27 -0700 |
|---|---|---|
| committer | Keith Randall <khr@golang.org> | 2025-07-21 17:54:26 -0700 |
| commit | d5ec0815e69175d93bb741e9bb0a55b919facc6d (patch) | |
| tree | e9db44e62687e811d5ceb7099cb62cec56f4e124 /src/runtime | |
| parent | f7cc61e7d7f77521e073137c6045ba73f66ef902 (diff) | |
| download | go-d5ec0815e69175d93bb741e9bb0a55b919facc6d.tar.xz | |
runtime: relax TestMemoryLimitNoGCPercent a bit
It seems to be pretty flaky. I've seen:
retained=289438024
limit=268435456
bound=285212672
Which is ~4MB over the bound.
Not sure why this tends to be darwin-specific, but we'll fix
just darwin for now.
(It isn't quite darwin-only, as it appeared in #66893.
But it is certainly worse on darwin.)
Fixes #73136
Update #66893
Change-Id: If609e909bc6c65c2663dd46b7a9bad4fd291c3da
Reviewed-on: https://go-review.googlesource.com/c/go/+/689315
Reviewed-by: Keith Randall <khr@google.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Diffstat (limited to 'src/runtime')
| -rw-r--r-- | src/runtime/testdata/testprog/gc.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/runtime/testdata/testprog/gc.go b/src/runtime/testdata/testprog/gc.go index 5dc85fbb62..bbe1453401 100644 --- a/src/runtime/testdata/testprog/gc.go +++ b/src/runtime/testdata/testprog/gc.go @@ -395,6 +395,9 @@ func gcMemoryLimit(gcPercent int) { // somewhat heavily here) this bound is kept loose. In practice the Go runtime // should do considerably better than this bound. bound := int64(myLimit + 16<<20) + if runtime.GOOS == "darwin" { + bound += 16 << 20 // Be more lax on Darwin, see issue 73136. + } start := time.Now() for time.Since(start) < 200*time.Millisecond { metrics.Read(m[:]) |
