Skip to content

Fix host memory detection on macOS - #71

Closed
BrendanStork wants to merge 1 commit into
Algorithmiq:mainfrom
BrendanStork:fix-macos-memory
Closed

BrendanStork wants to merge 1 commit into
Algorithmiq:mainfrom
BrendanStork:fix-macos-memory

Conversation

@BrendanStork

Copy link
Copy Markdown

Summary

Fixes a macOS compatibility issue in host_memory_available(), where os.sysconf("SC_AVPHYS_PAGES") raises ValueError.

The change introduces a fallback to psutil.virtual_memory().available when the system call is unsupported, and adds psutil as a runtime dependency.

The existing Linux memory-detection logic is preserved.

Testing

  • python -m pytest tests/test_backend.py -v — 11 tests passed.
  • CPU MPO–MPO benchmark — completed successfully on macOS.

Fixes #70

@Panadestein
Panadestein marked this pull request as draft October 27, 2026 11:10
@Panadestein

Copy link
Copy Markdown
Member

Thanks for this PR! At the moment we don't support macos for this particular out-of-core procedure. Closing for now, but we could come to it later if needed (I will leave the issue open).

@Panadestein Panadestein closed this Nov 7, 2026
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.

host_memory_available() raises ValueError on macOS

2 participants