Namespaces

Enumerations

enum class Level : uint32_t
Name Value Comments
NORMAL 1u

The memory pressure level is healthy.

Registered clients are free to hold on to caches and allocate memory
unrestricted.

However, clients should take care to not proactively re-create caches on a
transition back to the NORMAL level, causing a memory spike that immediately
pushes the level over to WARNING again.

WARNING 2u

The memory pressure level is somewhat constrained, and might cross over to
the critical pressure range if left unchecked.

Registered clients are expected to optimize their operation to limit memory
usage, rather than for best performance, for example, by reducing cache sizes
and non-essential memory allocations.

Clients must take care to regulate the amount of work they undertake in
order to reclaim memory, and ensure that it does not cause visible
performance degradation. There exists some memory pressure, but not enough
to justify trading off user responsiveness to reclaim memory.

CRITICAL 3u

The memory pressure level is very constrained.

Registered clients are expected to drop all non-essential memory, and refrain
from allocating more memory. Failing to do so might result in the job
getting terminated, or the system being rebooted in the case of global
memory pressure.

Clients may undertake expensive work to reclaim memory if required, since
failing to do so might result in termination. The client might decide that a
performance hit is a fair tradeoff in this case.

Indicates the memory pressure level.

Defined at line 15 of file fidling/gen/sdk/fidl/fuchsia.memorypressure/fuchsia.memorypressure/hlcpp/fuchsia/memorypressure/cpp/fidl.h

Records

Functions

  • zx_status_t Clone (::fuchsia::memorypressure::Level value, ::fuchsia::memorypressure::Level * result)

    Defined at line 53 of file fidling/gen/sdk/fidl/fuchsia.memorypressure/fuchsia.memorypressure/hlcpp/fuchsia/memorypressure/cpp/fidl.h

  • zx_status_t Clone (const ::fuchsia::memorypressure::ProviderRegisterWatcherRequest & _value, ::fuchsia::memorypressure::ProviderRegisterWatcherRequest * _result)

    Defined at line 92 of file fidling/gen/sdk/fidl/fuchsia.memorypressure/fuchsia.memorypressure/hlcpp/fuchsia/memorypressure/cpp/fidl.h

  • zx_status_t Clone (const ::fuchsia::memorypressure::WatcherOnLevelChangedRequest & _value, ::fuchsia::memorypressure::WatcherOnLevelChangedRequest * _result)

    Defined at line 137 of file fidling/gen/sdk/fidl/fuchsia.memorypressure/fuchsia.memorypressure/hlcpp/fuchsia/memorypressure/cpp/fidl.h