Skip to content

docs: document allocator override scope - #75

Merged
megabyde merged 2 commits into
mainfrom
docs/allocator-scope
Aug 23, 2026
Merged

docs: document allocator override scope#75
megabyde merged 2 commits into
mainfrom
docs/allocator-scope

Conversation

@megabyde

Copy link
Copy Markdown
Owner

Adds an Allocators subsection under Build policy in docs/development.md, answering a question the template currently leaves open: why nothing here selects mimalloc, jemalloc, or tcmalloc.

The note records the three constraints that make an allocator override more than a link-line change in this repo:

  • ASan installs its own malloc/free interceptors, so an override either fails to link or leaves the heap diagnostics silently disabled, and every sanitize* preset would have to gate it off.
  • The override mechanism is per platform: static override on Linux, DYLD_INSERT_LIBRARIES interposition on macOS, mimalloc-redirect.dll beside the executable on Windows, which the current install(TARGETS) rule does not ship.
  • The override is process-wide while dependency binaries come from the Conan cache unrebuilt, so a measurement has to cover the whole process.

It closes with the path to add one anyway, pointing at the optional-tool pattern the recipe already uses for ccache and mold/LLD.

Documentation only. No build, preset, or recipe changes. markdownlint and prettier --check pass; make format-check was not run locally because cmake-format is not installed on this machine.

Record why no preset or CMake option selects mimalloc, jemalloc, or
tcmalloc: ASan's malloc interceptors, the per-platform override
mechanism, and dependency binaries that come from the Conan cache
unrebuilt. Point at the existing optional-tool pattern in the recipe for
anyone adding one.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3c7253193e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread docs/development.md Outdated
UBSan does not intercept malloc, so sanitize-ubsan can run an allocator
override. Name the Address and AddressUndefinedBehavior settings instead
of every sanitize* preset.
@megabyde
megabyde merged commit f5faefe into main Aug 23, 2026
17 checks passed
@megabyde
megabyde deleted the docs/allocator-scope branch August 23, 2026 20:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant