Gjsify LogoGjsify Logo

Hierarchy

  • MemoryPressureSettings

Index

Constructors

Properties

name: string

Methods

  • free(): void
  • getConservativeThreshold(): number
  • getKillThreshold(): number
  • getMemoryLimit(): number
  • getPollInterval(): number
  • getStrictThreshold(): number
  • setConservativeThreshold(value: number): void
  • Sets value as the fraction of the defined memory limit where the conservative policy starts working. This policy will try to reduce the memory footprint by releasing non critical memory.

    The threshold must be bigger than 0 and smaller than 1, and it must be smaller than the strict threshold defined in settings. The default value is 0.33.

    Parameters

    • value: number

      fraction of the memory limit where the conservative policy starts working.

    Returns void

  • setKillThreshold(value: number): void
  • Sets value as the fraction of the defined memory limit where the process will be killed.

    The threshold must be a value bigger or equal to 0. A value of 0 means that the process is never killed. If the threshold is not 0, then it must be bigger than the strict threshold defined in settings. The threshold can also have values bigger than 1. The default value is 0.

    Parameters

    • value: number

      fraction of the memory limit where the process will be killed because of excessive memory usage.

    Returns void

  • setMemoryLimit(memoryLimit: number): void
  • Sets memory_limit the memory limit value to settings.

    The default value is the system's RAM size with a maximum of 3GB.

    Parameters

    • memoryLimit: number

      amount of memory (in MB) that the process is allowed to use.

    Returns void

  • setPollInterval(value: number): void
  • Sets value as the poll interval used by settings.

    The poll interval value must be bigger than 0. The default value is 30 seconds.

    Parameters

    • value: number

      period (in seconds) between memory usage measurements.

    Returns void

  • setStrictThreshold(value: number): void
  • Sets value as the fraction of the defined memory limit where the strict policy starts working. This policy will try to reduce the memory footprint by releasing critical memory.

    The threshold must be bigger than 0 and smaller than 1. Also, it must be bigger than the conservative threshold defined in settings, and smaller than the kill threshold if the latter is not 0. The default value is 0.5.

    Parameters

    • value: number

      fraction of the memory limit where the strict policy starts working.

    Returns void

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Type alias with type parameter
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method