Skip to content

Report live bytes as well as line usage, and size the heap from live bytes #83

Closed

Description

@dimensionscape

Immix counts a whole 128-byte line as used when any live object touches it, and the next collection target is computed from those line bytes, so fragmentation and the 100% target free space compound and a process can hold about twice its live data. Exposing live bytes next to line bytes (a MEM_INFO_* value) would make this measurable, and basing the target on live bytes would shrink it.

Activity

  1. dimensionscape commented on Oct 19, 2026

    @dimensionscape
    MemberAuthor

    Status: can be done entirely in libhxcpp; no Haxe change needed.

    The MEM_INFO_* values come from the runtime's enum in src/hx/gc/Immix.cpp (around line 267). Haxe's std/cpp/vm/Gc.hx only gives names to 0 to 3 as plain constants. A new value for live bytes works through Gc.memInfo64(<value>) straight away; a named constant in Haxe's std would be nice to have, not required.

    Note for the second half: sizing the heap from live bytes changes when collections happen, so for a 6.x release it should be opt-in (a define) or come with measurements.

  2. added a commit that references this issue on Oct 21, 2026
    270ae1b
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