def _gather_buffer_space():
 if HAS_PSUTIL:
  total_mem = psutil.virtual_memory().total
 else:
  os_data = {'kernel': platform.system()}
  grains = salt.grains.core._memdata(os_data)
  total_mem = grains['mem_total']
 return max([(total_mem * 0.05), (10 << 20)])

def _gather_buffer_space ( ) : if HAS_PSUTIL : total_mem = psutil . virtual_memory ( ) . total else : os_data = { 'kernel' : platform . system ( ) } grains = salt . grains . core . _memdata ( os_data ) total_mem = grains [ 'mem_total' ] return max ( [ ( total_mem * 0.05 ) , ( 10 << 20 ) ] )
gather some system data and then calculate buffer space .