Expand description
Memory pressure the platform reports for this process.
Android delivers it through onTrimMemory; other hosts publish their own
signal. There is no backlog: pressure describes a moment, so an observer
that registers later waits for the next report. Applications collect the
stream and give back what they can rebuild — caches, warm model sessions,
pools.
Structs§
- Memory
Pressure Observer - Keeps an observer registered until it is dropped.
Enums§
- Memory
Pressure - How hard the platform asks for memory back.
Functions§
- observe_
memory_ pressure - Registers
observerfor pressure reports. - publish_
memory_ pressure - Publishes a pressure report. Callable from any thread; the framework moves each report onto the UI thread before a composition sees it.
- remember
Memory Pressure - Collects pressure reports for as long as this call stays in the composition.