mirror of
https://github.com/storytold/effectcraft.git
synced 2026-11-20 00:55:43 +00:00
render::memory::Accountant: one budget (the sum of the Memory & CPU budgets) over the holders that register with it: the footage frames (priority 0), the disk write queue (0), the decoded footage planes (1) and the layer cache (2). Over the budget it frees lowest priority first, down to 90% of it; a holder that makes again what it just let go of (the layer cache tells its refills) is protected while it thrashes. Holders are held weakly and balanced after their own inserts, with their locks released.