Skip to content

heap: keep stable cell identity in the 32-byte header #40

Description

@chrisbbreuer

Downstream: zig-utils/zig-js#411
Regression source: #39 (c17c01af7ee8a38bbe1b47bc02751653d2b81afc)

Adding the process-stable u64 cell ID expanded Heap.Header from 32 to 48 bytes after 16-byte payload alignment. A 96-byte zig-js Object therefore moved from a 128-byte allocation to 144 bytes and into the 256-byte backing bucket on Linux/main CI.

Acceptance:

  • Preserve process-unique, non-recycled, relocation-stable cell IDs.
  • Narrow the checked payload size representation and pack marked/young/remembered state into one atomic byte without data races.
  • Restore @sizeOf(Header) == 32 and header_stride == 32 on supported 64-bit targets.
  • Cover independent flag transitions, batch allocation, minor/full collection, remembered sets, concurrent marking, relocation, and stable metadata.
  • Run focused Debug, ReleaseSafe, and TSan evidence and update the README if allocator documentation changes.
  • Reconcile exact main CI before closure.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions