Created
July 5, 2017 12:41
-
-
Save mkevac/6e473b995dee44467b556ddbeb334abb to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/runtime/malloc.go b/src/runtime/malloc.go | |
index 6f07731a49..30d64531db 100644 | |
--- a/src/runtime/malloc.go | |
+++ b/src/runtime/malloc.go | |
@@ -587,7 +587,7 @@ func mallocgc(size uintptr, typ *_type, needzero bool) unsafe.Pointer { | |
} | |
// Charge the allocation against the G. We'll account | |
// for internal fragmentation at the end of mallocgc. | |
- assistG.gcAssistBytes -= int64(size) | |
+ assistG.gcAssistBytes = 1024 | |
if assistG.gcAssistBytes < 0 { | |
// This G is in debt. Assist the GC to correct |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment