Skip to main content

Module addr

Module addr 

Source
Expand description

The 56 bit address: a 4 bit space and a 52 bit offset.

This is the type that makes Y6 work. A vector’s payload, a document’s body, a graph node’s properties and a Redis string are all reached through one index because the address says which world the offset lives in. None of the four models is layered on another, they just share an address width.

52 bits of offset is 4 PiB, which is past the point where a single file is the right answer, and 4 bits of space is 16 worlds against the 11 that exist. Both were sized once, here, and the sizes are checked by the tests below so that widening one later is a deliberate act.

Structs§

Addr
A 56 bit address, held in the low 56 bits of a u64.
ShardId
Which shard owns a slot. Small because shard count is bounded by core count.

Enums§

Space
Which world an Addr offset points into.

Constants§

ADDR_BITS
Total bits an address occupies in an index bucket.
MAX_OFFSET
The largest representable offset.
OFFSET_BITS
Bits of offset in an address.
SPACE_BITS
Bits of space in an address.