Skip to content

Packed doubly-linked-list #4

@fengb

Description

@fengb

Once we have #3, we have a really nice characteristic:

  • Small allocations are always align(16). The extra bits can denote the small size bitshift... which incidentally is less than 16.
  • Large allocations are always align(32K) or align(64K). The extra bits can denote the total pages, which maps to 2GB or 4GB respectively.

With this type of packing, we only need a usize word (4B) for the metadata. Thus current minimum payload is expanded to 12B.

We might be able to support 4B payloads — it allows for align(8) which is not enough space to store the length, but we can possibly assume any align(8) has to be 4B allocations.
Inconsistent metadata is very hard to detect so we'll stick with 12B minimum payloads.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions