cfnptr / cfnptr/ecsm

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

Open
#4 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
C++
Stars
6
Forks
3
PR merge metrics
No merged PRs in 30d

Description

  • 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.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing LinearPool::freeItems and how free item spots are added and consumed. Define ItemRange with begin and end, then verify that touching ranges are detected and compacted, such as [0, 43] and [44, 59] becoming [0, 59]. Consider whether a sorted tree is needed to reduce freeItems memory usage and support compaction.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
tooling
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.