Skip to content

关于1.3.3节hmap的疑问 #3

@marjune163

Description

@marjune163
  1. 确定bucket的index:书上说是用hash的低位与hmap.B取模,是否应该是与2^hmap.B取模?
  2. 增量扩容:32页的图是否B=0更合理?33页的图是否B=1更合理?
  3. 如何确定bucket的某一项是空闲的,因为全0的值也可以是有效的tophash,key或者value?
  4. 完成扩容迁移:从oldbuckets迁移到buckets,项目应该是重新分布在各个bucket中的吧,而不应该还是集中在同一个bucket中?34页的图显示迁移过来的项目仍然集中在一个bucket中。

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions