Skip to content

Fix host memory detection on macOS - #71

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

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

This branch has not been deployed

No deployments
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

1 participant