Skip to content

Version and Device Compatibility of MMKV Data #1430

Answered by lingol
JerryMu asked this question in Q&A
Discussion options

You must be logged in to vote

Well, there are several things you should test carefully.

  • The page size. As I mentioned above, different platforms have different page sizes. Normally, the page size is a multiple of 4K. While it's okay to port an MMKV from a large page-size platform to a small one, it might be problematic to port from small to large. Specifically, Win32 & Android have a 4K page size until Android 15, while iOS/macOS has 16K. I believe the MemoryFile class in the MMKV Core lib has managed it robustly. You should test it regardless.
  • The endianness. While most of the value is encoded by variant, there's some info encoded as-is from memory. Specifically, the metafile (*.crc) is memory copied. This should be…

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@JerryMu
Comment options

@lingol
Comment options

@JerryMu
Comment options

@lingol
Comment options

Answer selected by JerryMu
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants