#!/usr/bin/env python3

import os

'''
Print total size of memory in Gb.
This has been tested both on Linux and OSX High Sierra.
'''

mem_bytes = os.sysconf('SC_PAGE_SIZE') * os.sysconf('SC_PHYS_PAGES')  # e.g. 4015976448
mem_gib = mem_bytes/(1024.**3)  # e.g. 3.74

if __name__ == "__main__":
    print(int(round(mem_gib)))



