Skip to content

Commit 980ef25

Browse files
committed
runtime: deduct assist credit when gcBlackenEnabled
[CL614257](https://go-review.googlesource.com/c/go/+/614257) has changed the original behavior. This modification will restore it.
1 parent 86b5ba7 commit 980ef25

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/runtime/arena.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -745,7 +745,9 @@ func newUserArenaChunk() (unsafe.Pointer, *mspan) {
745745
// does represent additional work for the GC, but we also have no idea
746746
// what that looks like until we actually allocate things into the
747747
// arena).
748-
deductAssistCredit(userArenaChunkBytes)
748+
if gcBlackenEnabled != 0 {
749+
deductAssistCredit(userArenaChunkBytes)
750+
}
749751

750752
// Set mp.mallocing to keep from being preempted by GC.
751753
mp := acquirem()

0 commit comments

Comments
 (0)