aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/malloc.go
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2015-02-19 15:48:40 -0500
committerRuss Cox <rsc@golang.org>2015-02-20 17:00:22 +0000
commit2b655c0b928128de154a130876cdff03d973dd90 (patch)
tree0055412e48924b38db2ed68e272e6cb66fd184a2 /src/runtime/malloc.go
parent6e70fddec0e1d4a43ffb450f555dde82ff313397 (diff)
downloadgo-2b655c0b928128de154a130876cdff03d973dd90.tar.xz
runtime: tidy GC driver
Change-Id: I0da26e89ae73272e49e82c6549c774e5bc97f64c Reviewed-on: https://go-review.googlesource.com/5331 Reviewed-by: Austin Clements <austin@google.com>
Diffstat (limited to 'src/runtime/malloc.go')
-rw-r--r--src/runtime/malloc.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/runtime/malloc.go b/src/runtime/malloc.go
index b65bf70656..475f97fd05 100644
--- a/src/runtime/malloc.go
+++ b/src/runtime/malloc.go
@@ -655,7 +655,7 @@ func mallocgc(size uintptr, typ *_type, flags uint32) unsafe.Pointer {
}
if shouldtriggergc() {
- gogc(0)
+ startGC(gcBackgroundMode)
} else if shouldhelpgc && atomicloaduint(&bggc.working) == 1 {
// bggc.lock not taken since race on bggc.working is benign.
// At worse we don't call gchelpwork.