src/base/util/memory_pressure/system_memory_pressure_evaluator_chromeos.cc
// Converts an available memory value in MB to a memory pressure level.
Converts an available memory value in MB to a memory pressure level.
Converts an available memory value in MB to a memory pressure level .
base::MemoryPressureListener::MemoryPressureLevel
GetMemoryPressureLevelFromAvailable(int available_mb,
                                    int moderate_avail_mb,
                                    int critical_avail_mb) {
  if (available_mb < critical_avail_mb)
    return base::MemoryPressureListener::MEMORY_PRESSURE_LEVEL_CRITICAL;
  if (available_mb < moderate_avail_mb)
    return base::MemoryPressureListener::MEMORY_PRESSURE_LEVEL_MODERATE;
  return base::MemoryPressureListener::MEMORY_PRESSURE_LEVEL_NONE;
}
base :: MemoryPressureListener :: MemoryPressureLevel GetMemoryPressureLevelFromAvailable ( int available_mb , int moderate_avail_mb , int critical_avail_mb ) { if ( available_mb < critical_avail_mb ) return base :: MemoryPressureListener :: MEMORY_PRESSURE_LEVEL_CRITICAL ; if ( available_mb < moderate_avail_mb ) return base :: MemoryPressureListener :: MEMORY_PRESSURE_LEVEL_MODERATE ; return base :: MemoryPressureListener :: MEMORY_PRESSURE_LEVEL_NONE ; }
Converts an available memory value in MB to a memory pressure level.
Converts an available memory value in MB to a memory pressure level .