Module strategy

Source
Expand description

A strategy tracks free space and decides where allocations are to be made.

Note that strategy excludes:

  • get/set byte limits
  • reservation tracking of future allocations.
  • deallocated but not yet usable regions (awaiting flush).
  • Any TRIM-specific logic
  • Volume Deletion

These sorts of higher-level concepts should be implemented in Allocator.

Strategies should be concerned only with selecting which free regions of disk to hand out.

Structs§

BestFit
An allocation strategy that returns the smallest extent that is large enough to hold the requested allocation, or the next best if no extent is big enough.