1. type hmap struct {
    2. count int //元素个数
    3. flags uint8
    4. B uint8 //扩容常量
    5. noverflow uint16 //溢出 bucket 个数
    6. hash0 uint32 //hash 种子
    7. buckets unsafe.Pointer //bucket 数组指针
    8. oldbuckets unsafe.Pointer //扩容时旧的buckets 数组指针
    9. nevacuate uintptr //扩容搬迁进度
    10. extra *mapextra //记录溢出相关
    11. }
    1. type bmap struct {
    2. tophash [bucketCnt]uint8
    3. // Followed by bucketCnt keys
    4. //and then bucketan Cnt values
    5. // Followed by overflow pointer.
    6. }