CodeLife2012

Results 30 comments of CodeLife2012

I test the code, aborted the process when `doFullWriteBack` is running. Func `checkDataValid` report `check crc failed`, then the file is cleared.

@lingol You should use a new file instead of updating the mmap file directly, clear the mmap file only when keys are actually saved to the new file.

@lingol If old file exist, recover from the old file. If crashed before rename but after delete, use the new file.

Func `doFullWriteBack ` will call `sync(MMKV_SYNC)` to sync the `m_file` and `m_metaFile`.

According to this https://cloud.tencent.com/developer/article/1031030

Oh,it's on Mac OS.

Should I need disable rootless? Seems not work after I disable rootless. Now it will report ``` [ERROR] vm_read failed! 1 (readmem, 178) ```

Cached `FMStatement` access by multi thread. Root cause maybe gcd autorelease pool pop is not invoked when finish block execution, so temp var is not guarantee released on the serial...