Skip to content

Commit d5ec081

Browse files
committed
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>
1 parent f7cc61e commit d5ec081

File tree

1 file changed

+3
-0
lines changed
  • src/runtime/testdata/testprog

1 file changed

+3
-0
lines changed

src/runtime/testdata/testprog/gc.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -395,6 +395,9 @@ func gcMemoryLimit(gcPercent int) {
395395
// somewhat heavily here) this bound is kept loose. In practice the Go runtime
396396
// should do considerably better than this bound.
397397
bound := int64(myLimit + 16<<20)
398+
if runtime.GOOS == "darwin" {
399+
bound += 16 << 20 // Be more lax on Darwin, see issue 73136.
400+
}
398401
start := time.Now()
399402
for time.Since(start) < 200*time.Millisecond {
400403
metrics.Read(m[:])

0 commit comments

Comments
 (0)