cameron314 / cameron314/concurrentqueue

Add a context for allocations

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

Nobody has claimed this yet.

Dominant language
C++
Stars
12.5k
Forks
1.9k
PR merge metrics
No merged PRs in 30d

Description

Hello,

Thank you for your work!
It would be beneficial to implement a feature that allows the selection of an allocator instance at runtime. For instance, we could introduce an opaque context at the construction of the queue. This context would then be passed to the existing overridable malloc/free method traits. Subsequently, the context could be utilized to determine the appropriate allocator (for my purposes, a pointer would suffice, but the context could be simply defined in the traits class).

Another approach would be to make it stl-compliant, but I am afraid this is more work and will break existing user code.

What do you think?

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 examining how the queue is constructed and how its existing overridable malloc/free method traits are defined. Determine whether a runtime allocator context can be added without breaking existing user code; done means the intended allocator can be selected per queue instance, but the issue provides no named files or tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
backend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.