diff options
Diffstat (limited to 'src/pkg/runtime/malloc.cgo')
-rw-r--r-- | src/pkg/runtime/malloc.cgo | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/pkg/runtime/malloc.cgo b/src/pkg/runtime/malloc.cgo index e34393a85..948257973 100644 --- a/src/pkg/runtime/malloc.cgo +++ b/src/pkg/runtime/malloc.cgo @@ -27,10 +27,11 @@ mallocgc(uintptr size, uint32 refflag, int32 dogc) void *v; uint32 *ref; + if(gcwaiting && g != m->g0) + gosched(); if(m->mallocing) throw("malloc/free - deadlock"); m->mallocing = 1; - if(size == 0) size = 1; |