Adding support for tagging individual allocs
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 25/100
- issue の種類
- 機能追加
- 明瞭さ
- 説明が足りない
- 活発さ
- 停滞
- 技術スタック
- c
調査の方向性
まず、既存の new/malloc インターフェース、allocation ヘッダー、deallocation パス、および issue で言及されている tracking API を確認します。現在の allocation インターフェースを壊さずに、thread-local タグをどのように割り当てて保持するかを決定します。tagging の設計、メタデータの保存、deallocation の動作、tracking 統計が仕様化され、適切な検証とともに実装されていれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Hi @daanx and others!
I was wondering if anyone has ever implemented, or extended mimalloc in ways that it can support tagging - e.g. maybe initially just a custom provided byte, or word, dword that marks the block in a way.
Now I know this comes with few gotchas - existing new/malloc interfaces do not have this, so it has to be a threadlocal "global" (not ideal), but that would be acceptable for our use case. We can have some RAII controlled scopes pushing and popping threadlocal tags.
Then later, through a tracking API we can expose some stats and have IMG1 tag used this amount of bytes, etc.
The nasty bit here, is that this would require reading bits from the header just before that memory block is going to be deallocated... unless some scheme to keep tags on the side.
More or less, something that mimics Microsoft's Kernel ExAllocatePoolXxx functions - https://learn.microsoft.com/en-us/windows-hardware/drivers/ddi/wdm/nf-wdm-exallocatepool2
Just pondering on ideas, thoughts before diving in.
- 主要言語
- C
- スター
- 13.6k
- フォーク
- 1.2k
- 平均マージ
- 18時間 12分
- マージ済み PR(30日)
- 20
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
microsoft/mimalloc のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
Building mimalloc with `-Wundef` compiler flag logs many warnings on undefined macros対応中かも @vstinner が 1 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 64/100
microsoft/mimalloc#1506 · コメント 5 件 ·
メンテナーはふだん 1 日以内に返信
-
stale
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
microsoft/mimalloc#1113 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
microsoft/mimalloc#886 · コメント 4 件 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 64/100
microsoft/mimalloc#368 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
microsoft/mimalloc の issue をすべて見る
似ている issue
-
needs triage
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
389ds/389-ds-base#8157 ·
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
coolsnowwolf/lede#14305 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
Needs-Triage
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
メンテナーはふだん 2 日以内に返信