]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: fix reference to sys{Fault,Free,Reserve,Unused,Used} in comments
authorTobias Klauser <tklauser@distanz.ch>
Thu, 20 Sep 2018 09:43:42 +0000 (11:43 +0200)
committerTobias Klauser <tobias.klauser@gmail.com>
Tue, 25 Sep 2018 06:22:24 +0000 (06:22 +0000)
Change-Id: Icbaedc49c810c63c51d56ae394d2f70e4d64b3e0
Reviewed-on: https://go-review.googlesource.com/136495
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/runtime/malloc.go
src/runtime/mgcsweep.go

index 07e0a67240ceb848d796ee4e5f73b2a98ac334ca..c6c969a3bf00830be6ef68c5ff97944baa492f20 100644 (file)
@@ -328,27 +328,27 @@ var physPageSize uintptr
 // may use larger alignment, so the caller must be careful to realign the
 // memory obtained by sysAlloc.
 //
-// SysUnused notifies the operating system that the contents
+// sysUnused notifies the operating system that the contents
 // of the memory region are no longer needed and can be reused
 // for other purposes.
-// SysUsed notifies the operating system that the contents
+// sysUsed notifies the operating system that the contents
 // of the memory region are needed again.
 //
-// SysFree returns it unconditionally; this is only used if
+// sysFree returns it unconditionally; this is only used if
 // an out-of-memory error has been detected midway through
-// an allocation. It is okay if SysFree is a no-op.
+// an allocation. It is okay if sysFree is a no-op.
 //
-// SysReserve reserves address space without allocating memory.
+// sysReserve reserves address space without allocating memory.
 // If the pointer passed to it is non-nil, the caller wants the
-// reservation there, but SysReserve can still choose another
+// reservation there, but sysReserve can still choose another
 // location if that one is unavailable.
-// NOTE: SysReserve returns OS-aligned memory, but the heap allocator
+// NOTE: sysReserve returns OS-aligned memory, but the heap allocator
 // may use larger alignment, so the caller must be careful to realign the
 // memory obtained by sysAlloc.
 //
-// SysMap maps previously reserved address space for use.
+// sysMap maps previously reserved address space for use.
 //
-// SysFault marks a (already sysAlloc'd) region to fault
+// sysFault marks a (already sysAlloc'd) region to fault
 // if accessed. Used only for debugging the runtime.
 
 func mallocinit() {
index c7baa455fe19ee711ee787630b2597bc14af3d32..71f5c4b3a9dcb5426d5faab67c7f11ca827e3977 100644 (file)
@@ -339,18 +339,18 @@ func (s *mspan) sweep(preserve bool) bool {
                // Free large span to heap
 
                // NOTE(rsc,dvyukov): The original implementation of efence
-               // in CL 22060046 used SysFree instead of SysFault, so that
+               // in CL 22060046 used sysFree instead of sysFault, so that
                // the operating system would eventually give the memory
                // back to us again, so that an efence program could run
                // longer without running out of memory. Unfortunately,
-               // calling SysFree here without any kind of adjustment of the
+               // calling sysFree here without any kind of adjustment of the
                // heap data structures means that when the memory does
                // come back to us, we have the wrong metadata for it, either in
                // the MSpan structures or in the garbage collection bitmap.
-               // Using SysFault here means that the program will run out of
+               // Using sysFault here means that the program will run out of
                // memory fairly quickly in efence mode, but at least it won't
                // have mysterious crashes due to confused memory reuse.
-               // It should be possible to switch back to SysFree if we also
+               // It should be possible to switch back to sysFree if we also
                // implement and then call some kind of MHeap_DeleteSpan.
                if debug.efence > 0 {
                        s.limit = 0 // prevent mlookup from finding this span