MemoryPolicy constructor
const
MemoryPolicy({
- double headroomFraction = 0.15,
- int minContextTokens = 2048,
- int maxContextTokens = 32768,
- double resizeHysteresisFraction = 0.10,
- Duration resizeCooldown = const Duration(seconds: 30),
- Duration pollInterval = const Duration(seconds: 5),
- double pressureAvailableFraction = 0.08,
- bool unloadOnCritical = false,
- int maxStashBytes = 1024 * 1024 * 1024,
Creates a policy.
Implementation
const MemoryPolicy({
this.headroomFraction = 0.15,
this.minContextTokens = 2048,
this.maxContextTokens = 32768,
this.resizeHysteresisFraction = 0.10,
this.resizeCooldown = const Duration(seconds: 30),
this.pollInterval = const Duration(seconds: 5),
this.pressureAvailableFraction = 0.08,
this.unloadOnCritical = false,
this.maxStashBytes = 1024 * 1024 * 1024,
});