common/utilities: Made python_mem function only be called from Linux