You are reading a single comment by @fanoush and its replies. Click here to read the full conversation.
  • If the size of each record is fixed I would preallocate the file for specific period/number of records and used just­rage_write directly and then just fill it later record by record. Once full I'd start with another preallocated file. I'd keep current offset in variable in RAM or find where is last record by scanning the data if the variable got lost (e.g. after reset or dead battery). That way I wouldn't need to know the length. If the record is variable I'd include length into each record.


Avatar for fanoush @fanoush started