Commit 5b3cd560 authored by Jerrin Shaji George's avatar Jerrin Shaji George Committed by Brad Fitzpatrick

runtime: fix a few typos in comments

Change-Id: I07a1eb02ffc621c5696b49491181300bf411f822
Reviewed-on: https://go-review.googlesource.com/96475Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
parent 70b09c72
...@@ -11,7 +11,7 @@ package runtime ...@@ -11,7 +11,7 @@ package runtime
import "unsafe" import "unsafe"
// FixAlloc is a simple free-list allocator for fixed size objects. // FixAlloc is a simple free-list allocator for fixed size objects.
// Malloc uses a FixAlloc wrapped around sysAlloc to manages its // Malloc uses a FixAlloc wrapped around sysAlloc to manage its
// MCache and MSpan objects. // MCache and MSpan objects.
// //
// Memory returned by fixalloc.alloc is zeroed by default, but the // Memory returned by fixalloc.alloc is zeroed by default, but the
......
...@@ -43,7 +43,7 @@ type treapNode struct { ...@@ -43,7 +43,7 @@ type treapNode struct {
parent *treapNode // direct parent of this node, nil if root parent *treapNode // direct parent of this node, nil if root
npagesKey uintptr // number of pages in spanKey, used as primary sort key npagesKey uintptr // number of pages in spanKey, used as primary sort key
spanKey *mspan // span of size npagesKey, used as secondary sort key spanKey *mspan // span of size npagesKey, used as secondary sort key
priority uint32 // random number used by treap algorithm keep tree probablistically balanced priority uint32 // random number used by treap algorithm to keep tree probabilistically balanced
} }
func (t *treapNode) init() { func (t *treapNode) init() {
......
...@@ -530,7 +530,7 @@ func gcAssistAlloc1(gp *g, scanWork int64) { ...@@ -530,7 +530,7 @@ func gcAssistAlloc1(gp *g, scanWork int64) {
// store that clears it but an atomic check in every malloc // store that clears it but an atomic check in every malloc
// would be a performance hit. // would be a performance hit.
// Instead we recheck it here on the non-preemptable system // Instead we recheck it here on the non-preemptable system
// stack to determine if we should preform an assist. // stack to determine if we should perform an assist.
// GC is done, so ignore any remaining debt. // GC is done, so ignore any remaining debt.
gp.gcAssistBytes = 0 gp.gcAssistBytes = 0
......
...@@ -561,7 +561,7 @@ retry: ...@@ -561,7 +561,7 @@ retry:
goto retry goto retry
} }
if s.sweepgen == sg-1 { if s.sweepgen == sg-1 {
// the span is being sweept by background sweeper, skip // the span is being swept by background sweeper, skip
continue continue
} }
// already swept empty span, // already swept empty span,
...@@ -751,7 +751,7 @@ func (h *mheap) allocManual(npage uintptr, stat *uint64) *mspan { ...@@ -751,7 +751,7 @@ func (h *mheap) allocManual(npage uintptr, stat *uint64) *mspan {
s.nelems = 0 s.nelems = 0
s.elemsize = 0 s.elemsize = 0
s.limit = s.base() + s.npages<<_PageShift s.limit = s.base() + s.npages<<_PageShift
// Manually manged memory doesn't count toward heap_sys. // Manually managed memory doesn't count toward heap_sys.
memstats.heap_sys -= uint64(s.npages << _PageShift) memstats.heap_sys -= uint64(s.npages << _PageShift)
} }
......
...@@ -339,7 +339,7 @@ func (f *Func) funcInfo() funcInfo { ...@@ -339,7 +339,7 @@ func (f *Func) funcInfo() funcInfo {
// PCDATA and FUNCDATA table indexes. // PCDATA and FUNCDATA table indexes.
// //
// See funcdata.h and ../cmd/internal/obj/funcdata.go. // See funcdata.h and ../cmd/internal/objabi/funcdata.go.
const ( const (
_PCDATA_StackMapIndex = 0 _PCDATA_StackMapIndex = 0
_PCDATA_InlTreeIndex = 1 _PCDATA_InlTreeIndex = 1
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment