Bump-pointer + freed-stack id pool. Only ids currently in flight are stored:
next- the next never-allocated id (bump pointer), advanced up tomaxmax- top of the configured range (inclusive)freed- stack of returned ids available for reuseowners- map of monitor references to bound ids
The untouched tail of the range (next..max) is never materialised, so memory
is O(ids handed out and returned), not O(range size).
Summary
Types
@type t() :: %Hyper.Node.Users.State{ freed: [Hyper.Node.Users.id()], max: Hyper.Node.Users.id(), next: Hyper.Node.Users.id(), owners: %{required(reference()) => Hyper.Node.Users.id()} }