Source file src/internal/abi/map.go

     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 // log2 of number of elements in a bucket.
    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 // Must fit in a uint8.
    19  )
    20  

View as plain text