1
0
mirror of https://github.com/golang/go synced 2024-11-17 23:14:49 -07:00

runtime: rewrite a comment in malloc.go

This commit changes the wording of a comment in malloc.go that describes
how span objects are zeroed to make it more clear.

Change-Id: I07722df1e101af3cbf8680ad07437d4a230b0168
GitHub-Last-Rev: 0e909898c7
GitHub-Pull-Request: golang/go#37008
Reviewed-on: https://go-review.googlesource.com/c/go/+/217618
Reviewed-by: Austin Clements <austin@google.com>
This commit is contained in:
Jerrin Shaji George 2020-02-05 01:21:11 +00:00 committed by Austin Clements
parent 88ae4ccefb
commit 921ceadd29

View File

@ -62,9 +62,10 @@
// Allocating and freeing a large object uses the mheap // Allocating and freeing a large object uses the mheap
// directly, bypassing the mcache and mcentral. // directly, bypassing the mcache and mcentral.
// //
// Free object slots in an mspan are zeroed only if mspan.needzero is // If mspan.needzero is false, then free object slots in the mspan are
// false. If needzero is true, objects are zeroed as they are // already zeroed. Otherwise if needzero is true, objects are zeroed as
// allocated. There are various benefits to delaying zeroing this way: // they are allocated. There are various benefits to delaying zeroing
// this way:
// //
// 1. Stack frame allocation can avoid zeroing altogether. // 1. Stack frame allocation can avoid zeroing altogether.
// //