Can we have custom allocators in C?
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 693
- Forks
- 49
- PR merge metrics
- No merged PRs in 30d
Description
Mixin allocators are allowed, but all others, the ones that are std::pmr::polymorphic_allocator in C++, are not. C code uses the default allocation for all of them.
Moreover since objects and mutations are fully wrapped to expose to C, every instance of an object or an allocation leads to new/delete.
The question is: can we solve one or both of these problems by allowing allocator customization from C?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the C-facing object and mutation wrappers and the allocation paths that currently use the default allocator; the issue names no files or tests. Determine whether allocator customization is feasible for non-mixin allocations, then document or implement a decided scope with tests covering the supported C-facing cases.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, cpp
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100