@lru_cache()
def physical_memory():
 (start_time, parameter) = (time.time(), 'system physical memory')
 mem_total_line = _get_line('/proc/meminfo', 'MemTotal:', parameter)
 try:
  result = (int(mem_total_line.split()[1]) * 1024)
  _log_runtime(parameter, '/proc/meminfo[MemTotal]', start_time)
  return result
 except:
  exc = IOError(('unable to parse the /proc/meminfo MemTotal entry: %s' % mem_total_line))
  _log_failure(parameter, exc)
  raise exc

@ lru_cache ( ) def physical_memory ( ) : ( start_time , parameter ) = ( time . time ( ) , 'system physical memory' ) mem_total_line = _get_line ( '/proc/meminfo' , 'MemTotal:' , parameter ) try : result = ( int ( mem_total_line . split ( ) [ 1 ] ) * 1024 ) _log_runtime ( parameter , '/proc/meminfo[MemTotal]' , start_time ) return result except : exc = IOError ( ( 'unable to parse the /proc/meminfo MemTotal entry: %s' % mem_total_line ) ) _log_failure ( parameter , exc ) raise exc
provides the total physical memory on the system in bytes .