Skip to content

Commit

Permalink
SC_PAGESIZE should work on macOS and Linux
Browse files Browse the repository at this point in the history
Fixes: #114
  • Loading branch information
asmacdo committed Jul 31, 2024
1 parent 71dc181 commit b5d58d9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/con_duct/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ def collect_environment(self) -> None:
def get_system_info(self) -> None:
"""Gathers system information related to CPU, GPU, memory, and environment variables."""
uid = os.environ.get("USER")
memory_total = os.sysconf("SC_PAGE_SIZE") * os.sysconf("SC_PHYS_PAGES")
memory_total = os.sysconf("SC_PAGESIZE") * os.sysconf("SC_PHYS_PAGES")
cpu_total = os.sysconf("SC_NPROCESSORS_CONF")
self.system_info = SystemInfo(
uid=uid, memory_total=memory_total, cpu_total=cpu_total
Expand Down

0 comments on commit b5d58d9

Please sign in to comment.