Skip to content

Detect contiguous unused elements in pools and introduce ranges for free element spots. #4

@dimonkov

Description

@dimonkov
  • Detect when items in LinearPool::freeItems are touching and introduce free item ranges.
  • Compact (collapse) adjacent free ranges that are touching into a single range, example [0, 43] and [44, 59] -> [0, 59].
  • Possibly look into storing free ranges as a sorted tree structure to help with compacting.
struct ItemRange
{
    uint32 begin = 0;
    uint32 end = 0;
};

It can help to reduce freeItems array memory usage.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions