From c3ab26e8bb0c5bf1c20358d036f987a20734c9ad Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Fri, 16 Feb 2018 16:42:53 +0000 Subject: 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 --- libgo/go/runtime/malloc.go | 1 + 1 file changed, 1 insertion(+) (limited to 'libgo/go/runtime/malloc.go') 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() } -- cgit v1.1