[Question] Why does the total value decrease when the "_mi_stats_print" function is executed for each TLD?

オープン
#1,208 コメント 3 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
35/100
issue の種類
バグ
明瞭さ
説明が足りない
活発さ
停滞
技術スタック
c

調査の方向性

_mi_stats_print エントリポイントから始め、mimalloc 2.1.2 と 3.0.8 での動作を比較してください。提供されている mi_custom_thread_stats_print_out ラッパーを使って TLD ごとの統計情報が繰り返し出力される状態を再現し、その後、報告される合計値が減少する理由を特定して、関連するバージョン変更を文書化してください。

索引モデルが issue の本文から書いたものです。

説明

Hi, thank you for your work on this project.

Image

In our proxy server project, which uses mimalloc as the memory manager, we maintain statistics for each TLD using a dedicated structure when the server process runs. We have implemented an interface function that allows us to print stats for each TLD using _mi_stats_print, as shown below. However, as you can see in the attached screenshot, we have observed that the value of "total" decreases when this is done.

void mi_custom_thread_stats_print_out(mi_stats_t* tid_stat, mi_output_fun* out, void* arg) mi_attr_noexcept {
  _mi_stats_print(tid_stat, out, arg);
}

This issue did not occur with mimalloc version 2.1.2, but started happening after upgrading to version 3.0.8. Do you have any idea what might be causing this?
For reference, the screenshot only shows the output for the “pssv#1” thread, filtered from the _mi_stats_print results using grep.

主要言語
C
スター
13.6k
フォーク
1.2k
平均マージ
18時間 12分
マージ済み PR(30日)
20

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

microsoft/mimalloc のほかの issue

microsoft/mimalloc の issue をすべて見る

似ている issue

C の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。