Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

The information displayed as available memory is inaccurate on macos/Linux

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

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

関連するプルリクエストがすでにマージされています。

  • #3299 @sabtain05 による — マージ済み
  • #3301 @filzrev による — マージ済み

評価

難易度
4/5
見積もり時間
1〜2日
初心者へのやさしさ
53/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
csharp
領域
performance

調査の方向性

Read the macOS implementation in src/BenchmarkDotNet/Environments/PhysicalMemoryInfo.cs, especially the code that reads free pages and the vm_stat output. The issue points to host_statistics64 as the native API for obtaining VM statistics. Confirm which reusable pages should count as available, then compare the reported value with macOS benchmark results where possible; done means the available memory includes the relevant reusable pages.

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

説明

When running benchmarks on macos(x64) CI environment.
Following CPU/Memory information is shown.

BenchmarkDotNet v0.16.0-ci, macOS Tahoe 26.6.1 (25G76) [Darwin 25.6.0]
Intel Core i7-8700B CPU 3.20GHz (Max: 3.19GHz) (Coffee Lake), 1 CPU, 4 logical and 4 physical cores
Memory: 14 GB Total, 0.44 GB Available

But, Memory: value(0.44 GB Available) looks like wrong value. (Compared to other envrionment benchmark results)

It seems current PhysicalMemoryInfo.cs implementation for macos gets free pages bytes only and other reusable pages bytes are ignored.

Other Considerations
It need to use host_statistics64 native API to get VMstats.

~~And currently page size is expected to be fixed value (4096). ~~
https://github.com/dotnet/BenchmarkDotNet/blob/61ebda8a50aea46484107c2f8d3e736cc31d15e5/src/BenchmarkDotNet/Environments/PhysicalMemoryInfo.cs#L139

But page size is different on arm64 environment(16384)
It need to get actual page size.

Ignore above comment. pageSize is overwritten by vm_stat parsed value. (It might be failed on localized environment thoght)

主要言語
C#
スター
11.5k
フォーク
1.1k
平均マージ
2日 3時間
マージ済み PR(30日)
17

環境構築

はじめの一歩

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

dotnet/BenchmarkDotNet のほかの issue

dotnet/BenchmarkDotNet の issue をすべて見る

似ている issue

C# の issue をもっと見る

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

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