iboB / iboB/dynamix

Can we have custom allocators in C?

Open
#66 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

capi
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

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.