aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/HACKING.md
diff options
context:
space:
mode:
Diffstat (limited to 'src/runtime/HACKING.md')
-rw-r--r--src/runtime/HACKING.md11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/runtime/HACKING.md b/src/runtime/HACKING.md
index 993edc67d8..fbf22eeb44 100644
--- a/src/runtime/HACKING.md
+++ b/src/runtime/HACKING.md
@@ -281,11 +281,12 @@ go:notinheap
------------
`go:notinheap` applies to type declarations. It indicates that a type
-must never be allocated from the GC'd heap. Specifically, pointers to
-this type must always fail the `runtime.inheap` check. The type may be
-used for global variables, for stack variables, or for objects in
-unmanaged memory (e.g., allocated with `sysAlloc`, `persistentalloc`,
-`fixalloc`, or from a manually-managed span). Specifically:
+must never be allocated from the GC'd heap or on the stack.
+Specifically, pointers to this type must always fail the
+`runtime.inheap` check. The type may be used for global variables, or
+for objects in unmanaged memory (e.g., allocated with `sysAlloc`,
+`persistentalloc`, `fixalloc`, or from a manually-managed span).
+Specifically:
1. `new(T)`, `make([]T)`, `append([]T, ...)` and implicit heap
allocation of T are disallowed. (Though implicit allocations are