Skip to content

Circular allocator#151

Merged
tilk merged 4 commits into
kuznia-rdzeni:masterfrom
tilk:circular_allocator
May 1, 2026
Merged

Circular allocator#151
tilk merged 4 commits into
kuznia-rdzeni:masterfrom
tilk:circular_allocator

Conversation

@tilk
Copy link
Copy Markdown
Member

@tilk tilk commented Apr 27, 2026

Sometimes a FIFO-like allocation system is needed without an actual FIFO. This PR factors out the allocator of BasicFifo and extends it with multi-allocation.

TODO:

  • Return all allocated/deallocated IDs for convenience
  • Docstrings
  • Tests

@tilk tilk added the enhancement New feature or request label Apr 27, 2026
@awariac
Copy link
Copy Markdown
Member

awariac commented Apr 27, 2026

Return all allocated/deallocated IDs for convenience

Would be helpful to add extra option to enable logging of each allocation/deallocation, as similar mechanism is used e.g. in Coreblocks CRAT.

@tilk
Copy link
Copy Markdown
Member Author

tilk commented Apr 30, 2026

I think that it's probably better not to include logging here. Logging messages are nicer when more domain-specific information is available, and it always can be added at the use site.

I'm experimenting with the docstring format for methods. I think that it's better to use shapes rather than types after the colons, as this is the information you actually need when interfacing with a method.

@tilk tilk marked this pull request as ready for review April 30, 2026 14:33
@tilk tilk merged commit 526a873 into kuznia-rdzeni:master May 1, 2026
3 checks passed
github-actions Bot pushed a commit that referenced this pull request May 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants