github.com/shogo82148/std@v1.22.1-0.20240327122250-4e474527810c/internal/abi/map.go (about) 1 // Copyright 2023 The Go Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style 3 // license that can be found in the LICENSE file. 4 5 package abi 6 7 // Map constants common to several packages 8 // runtime/runtime-gdb.py:MapTypePrinter contains its own copy 9 const ( 10 // Maximum number of key/elem pairs a bucket can hold. 11 MapBucketCountBits = 3 12 MapBucketCount = 1 << MapBucketCountBits 13 14 // Maximum key or elem size to keep inline (instead of mallocing per element). 15 // Must fit in a uint8. 16 // Note: fast map functions cannot handle big elems (bigger than MapMaxElemBytes). 17 MapMaxKeyBytes = 128 18 MapMaxElemBytes = 128 19 ) 20 21 // ZeroValSize is the size in bytes of runtime.zeroVal. 22 const ZeroValSize = 1024