From: Keith Randall Date: Mon, 8 Sep 2014 22:42:48 +0000 (-0700) Subject: runtime: note the double-releasem isn't an error. X-Git-Tag: go1.4beta1~469 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=1d88f9dd4ddc99c557593007ac4118492d559d05;p=gostls13.git runtime: note the double-releasem isn't an error. LGTM=bradfitz R=dave, bradfitz CC=golang-codereviews https://golang.org/cl/136390043 --- diff --git a/src/runtime/malloc.go b/src/runtime/malloc.go index b3c9c1fd78..8181312f17 100644 --- a/src/runtime/malloc.go +++ b/src/runtime/malloc.go @@ -134,6 +134,8 @@ func gomallocgc(size uintptr, typ *_type, flags int) unsafe.Pointer { if mp.curg != nil { mp.curg.stackguard0 = mp.curg.stackguard } + // Note: one releasem for the acquirem just above. + // The other for the acquirem at start of malloc. releasem(mp) releasem(mp) } @@ -309,6 +311,8 @@ marked: if mp.curg != nil { mp.curg.stackguard0 = mp.curg.stackguard } + // Note: one releasem for the acquirem just above. + // The other for the acquirem at start of malloc. releasem(mp) releasem(mp) }