aboutsummaryrefslogtreecommitdiff
path: root/libgo/go/runtime/malloc.go
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@gcc.gnu.org>2018-02-16 16:42:53 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2018-02-16 16:42:53 +0000
commitc3ab26e8bb0c5bf1c20358d036f987a20734c9ad (patch)
treed5ba10b1e7a7066a1d806d7a74159a141f9f53b8 /libgo/go/runtime/malloc.go
parent3943b161342a68ec90a7b977cf6a8e451671e25d (diff)
downloadgcc-c3ab26e8bb0c5bf1c20358d036f987a20734c9ad.zip
gcc-c3ab26e8bb0c5bf1c20358d036f987a20734c9ad.tar.gz
gcc-c3ab26e8bb0c5bf1c20358d036f987a20734c9ad.tar.bz2
runtime: add some more preemption checks
In particular this lets BenchmarkPingPongHog in runtime/proc_test.go complete. Reviewed-on: https://go-review.googlesource.com/94735 From-SVN: r257743
Diffstat (limited to 'libgo/go/runtime/malloc.go')
-rw-r--r--libgo/go/runtime/malloc.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/libgo/go/runtime/malloc.go b/libgo/go/runtime/malloc.go
index 88e4ba3..c27aa48 100644
--- a/libgo/go/runtime/malloc.go
+++ b/libgo/go/runtime/malloc.go
@@ -826,6 +826,7 @@ func mallocgc(size uintptr, typ *_type, needzero bool) unsafe.Pointer {
}
}
+ // Check preemption, since unlike gc we don't check on every call.
if getg().preempt {
checkPreempt()
}