Skip to content

Fix false positive in minc2-leak-test on macOS#144

Merged
vfonov merged 1 commit intoBIC-MNI:developfrom
gdevenyi:fix-macos
Mar 28, 2026
Merged

Fix false positive in minc2-leak-test on macOS#144
vfonov merged 1 commit intoBIC-MNI:developfrom
gdevenyi:fix-macos

Conversation

@gdevenyi
Copy link
Copy Markdown
Contributor

ru_maxrss is reported in bytes on macOS but kilobytes on Linux. The leak-detection threshold was implicitly calibrated for KB, causing a spurious "MEMORY LEAK DETECTED" on macOS (especially ARM runners) where values are 1024x larger.

Normalize ru_maxrss to KB on macOS via #ifdef APPLE.

References:

ru_maxrss is reported in bytes on macOS but kilobytes on Linux.
The leak-detection threshold was implicitly calibrated for KB,
causing a spurious "MEMORY LEAK DETECTED" on macOS (especially
ARM runners) where values are 1024x larger.

Normalize ru_maxrss to KB on macOS via #ifdef __APPLE__.

References:
- darwin-xnu getrusage.2: "in bytes"
  https://github.com/apple/darwin-xnu/blob/main/bsd/man/man2/getrusage.2
- Linux getrusage(2): "in KiB"
  https://man7.org/linux/man-pages/man2/getrusage.2.html

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@gdevenyi gdevenyi requested a review from vfonov March 27, 2026 21:21
@gdevenyi gdevenyi changed the base branch from master to develop March 27, 2026 21:49
@vfonov vfonov merged commit 5de9a12 into BIC-MNI:develop Mar 28, 2026
12 checks passed
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.

2 participants