aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/stubs.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/runtime/stubs.go')
-rw-r--r--src/runtime/stubs.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/runtime/stubs.go b/src/runtime/stubs.go
index b55c3c0590..2ee2c74dfe 100644
--- a/src/runtime/stubs.go
+++ b/src/runtime/stubs.go
@@ -73,7 +73,15 @@ func badsystemstack() {
// *ptr is uninitialized memory (e.g., memory that's being reused
// for a new allocation) and hence contains only "junk".
//
+// memclrNoHeapPointers ensures that if ptr is pointer-aligned, and n
+// is a multiple of the pointer size, then any pointer-aligned,
+// pointer-sized portion is cleared atomically. Despite the function
+// name, this is necessary because this function is the underlying
+// implementation of typedmemclr and memclrHasPointers. See the doc of
+// memmove for more details.
+//
// The (CPU-specific) implementations of this function are in memclr_*.s.
+//
//go:noescape
func memclrNoHeapPointers(ptr unsafe.Pointer, n uintptr)