utl::free_list with stable storage #14
No assignees
Labels
No labels
area/build
area/content
area/editor
area/engine
area/graphics
area/platform
area/repo-wide
area/tests
area/tools
bug
optional
roadmap
size/L
size/M
size/S
No project
No milestone
Blocks
Depends on
#19 Archetype ECS
UnflavoredMeson/Primal_Plus_Plus
#5 Unit tests with doctest
UnflavoredMeson/Primal_Plus_Plus
Reference
No Branch/Tag specified
Notifications
1 participant
Due date
No due date set.
Reference
UnflavoredMeson/Primal_Plus_Plus#14
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Why
The original
free_listmoved its items as bytes when it grew, which breaks any type that points into itself and invalidates references. The ECS, the renderer and the content system all keep references into free lists.Decided
utl::vectoris the engine's container (nostd::vectorswitch).utl::free_listkeeps items in blocks that never move (8, 16, 32, ... slots), with a live bit per slot: any type can go in, references stay valid until removal,remove()of a dead id is refused in every build,contains(id)checks, the destructor andclear()destroy what's left.Read first
UnflavoredMeson/Primal#48.Engine/Utilities/FreeList.honmaster.Steps
free_list.Done when
Claude can help with
Learn