Memory usage switcher with configurable thresholds
Design and code an in-memory switcher that watches memory usage and switches between states (or targets) when usage crosses thresholds the caller can configure. Cover how thresholds are set and changed, avoiding rapid flapping near a threshold, and how you would test it.
No answer yet. Write the first one; the best answer gets endorsed.
