diff options
author | Keith Randall <khr@golang.org> | 2014-09-08 15:42:48 -0700 |
---|---|---|
committer | Keith Randall <khr@golang.org> | 2014-09-08 15:42:48 -0700 |
commit | 8f563e578cc3de4e955c68ece2c2232e444610c3 (patch) | |
tree | ef482ed2abd94a044180d4990446c1b3ee208bd6 | |
parent | 493c50a00a9d7123cff0f7c93dc7c8214cb35246 (diff) | |
download | go-8f563e578cc3de4e955c68ece2c2232e444610c3.tar.gz |
runtime: note the double-releasem isn't an error.
LGTM=bradfitz
R=dave, bradfitz
CC=golang-codereviews
https://codereview.appspot.com/136390043
-rw-r--r-- | src/runtime/malloc.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/runtime/malloc.go b/src/runtime/malloc.go index b3c9c1fd7..8181312f1 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) } |