From 912bd566ad7b019aaca37ee4193f949afc34eaae Mon Sep 17 00:00:00 2001 From: ian 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 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@257743 138bc75d-0d04-0410-961f-82ee72b054a4 --- 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 88e4ba3657b..c27aa487df3 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.2.1