MemoryPolicy constructor

const MemoryPolicy({
  1. double headroomFraction = 0.15,
  2. int minContextTokens = 2048,
  3. int maxContextTokens = 32768,
  4. double resizeHysteresisFraction = 0.10,
  5. Duration resizeCooldown = const Duration(seconds: 30),
  6. Duration pollInterval = const Duration(seconds: 5),
  7. double pressureAvailableFraction = 0.08,
  8. bool unloadOnCritical = false,
  9. 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,
});