stack allocated buffer

This commit is contained in:
Darien Raymond
2018-11-15 16:04:13 +01:00
parent 24288a74a2
commit 770a20d266
2 changed files with 29 additions and 2 deletions

11
common/stack/bytes.go Normal file
View File

@@ -0,0 +1,11 @@
package stack
// TwoBytes is a [8]byte which is always allocated on stack.
//
//go:notinheap
type TwoBytes [2]byte
// EightBytes is a [8]byte which is always allocated on stack.
//
//go:notinheap
type EightBytes [8]byte