title: Managing Log File Sizes
body: <p>I am implementing a simple log file handler for an embedded device. I cannot use syslog because it is already reserved for other uses. The device's SSD size is limited, so there is a real risk of the log file using all of the disk space, which will crash the device.</p>
  
  <p>What is the cheapest way I can guarantee I will have at least X remaining disk space after a write?</p>