An efficient, small mobile key-value storage framework developed by WeChat. Works on Android, iOS, macOS, Windows, and POSIX.

license PRs Welcome Release Version Platform

中文版本请参看这里

MMKV is an efficient, small, easy-to-use mobile key-value storage framework used in the WeChat application. It's currently available on Android, iOS/macOS, Win32 and POSIX.

MMKV for Android

Features

  • Efficient. MMKV uses mmap to keep memory synced with file, and protobuf to encode/decode values, making the most of Android to achieve best performance.

    • Multi-Process concurrency: MMKV supports concurrent read-read and read-write access between processes.
  • Easy-to-use. You can use MMKV as you go. All changes are saved immediately, no sync, no apply calls needed.

  • Small.

    • A handful of files: MMKV contains process locks, encode/decode helpers and mmap logics and nothing more. It's really tidy.
    • About 50K in binary size: MMKV adds about 50K per architecture on App size, and much less when zipped (apk).

Getting Started

Installation Via Maven

Add the following lines to build.gradle on your app module:

dependencies {
    implementation 'com.tencent:mmkv:1.2.11'
    // replace "1.2.11" with any available version
}

Starting from v1.2.8, MMKV has been migrated to Maven Central.
For other installation options, see Android Setup.

Quick Tutorial

You can use MMKV as you go. All changes are saved immediately, no sync, no apply calls needed.
Setup MMKV on App startup, say your Application class, add these lines:

public void onCreate() {
    super.onCreate();

    String rootDir = MMKV.initialize(this);
    System.out.println("mmkv root: " + rootDir);
    //……
}

MMKV has a global instance, that can be used directly:

import com.tencent.mmkv.MMKV;
    
MMKV kv = MMKV.defaultMMKV();

kv.encode("bool", true);
boolean bValue = kv.decodeBool("bool");

kv.encode("int", Integer.MIN_VALUE);
int iValue = kv.decodeInt("int");

kv.encode("string", "Hello from mmkv");
String str = kv.decodeString("string");

MMKV also supports Multi-Process Access. Full tutorials can be found here Android Tutorial.

Performance

Writing random int for 1000 times, we get this chart:

For more benchmark data, please refer to our benchmark.

MMKV for iOS/macOS

Features

  • Efficient. MMKV uses mmap to keep memory synced with file, and protobuf to encode/decode values, making the most of iOS/macOS to achieve best performance.

  • Easy-to-use. You can use MMKV as you go, no configurations needed. All changes are saved immediately, no synchronize calls needed.

  • Small.

    • A handful of files: MMKV contains encode/decode helpers and mmap logics and nothing more. It's really tidy.
    • Less than 30K in binary size: MMKV adds less than 30K per architecture on App size, and much less when zipped (ipa).

Getting Started

Installation Via CocoaPods:

  1. Install CocoaPods;
  2. Open terminal, cd to your project directory, run pod repo update to make CocoaPods aware of the latest available MMKV versions;
  3. Edit your Podfile, add pod 'MMKV' to your app target;
  4. Run pod install;
  5. Open the .xcworkspace file generated by CocoaPods;
  6. Add #import <MMKV/MMKV.h> to your source file and we are done.

For other installation options, see iOS/macOS Setup.

Quick Tutorial

You can use MMKV as you go, no configurations needed. All changes are saved immediately, no synchronize calls needed. Setup MMKV on App startup, in your -[MyApp application: didFinishLaunchingWithOptions:], add these lines:

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
    // init MMKV in the main thread
    [MMKV initializeMMKV:nil];

    //...
    return YES;
}

MMKV has a global instance, that can be used directly:

MMKV *mmkv = [MMKV defaultMMKV];
    
[mmkv setBool:YES forKey:@"bool"];
BOOL bValue = [mmkv getBoolForKey:@"bool"];
    
[mmkv setInt32:-1024 forKey:@"int32"];
int32_t iValue = [mmkv getInt32ForKey:@"int32"];
    
[mmkv setString:@"hello, mmkv" forKey:@"string"];
NSString *str = [mmkv getStringForKey:@"string"];

MMKV also supports Multi-Process Access. Full tutorials can be found here.

Performance

Writing random int for 10000 times, we get this chart:

For more benchmark data, please refer to our benchmark.

MMKV for Win32

Features

  • Efficient. MMKV uses mmap to keep memory synced with file, and protobuf to encode/decode values, making the most of Windows to achieve best performance.

    • Multi-Process concurrency: MMKV supports concurrent read-read and read-write access between processes.
  • Easy-to-use. You can use MMKV as you go. All changes are saved immediately, no save, no sync calls needed.

  • Small.

    • A handful of files: MMKV contains process locks, encode/decode helpers and mmap logics and nothing more. It's really tidy.
    • About 10K in binary size: MMKV adds about 10K on application size, and much less when zipped.

Getting Started

Installation Via Source

  1. Getting source code from git repository:

    git clone https://github.com/Tencent/MMKV.git
    
  2. Add Win32/MMKV/MMKV.vcxproj to your solution;

  3. Add MMKV project to your project's dependencies;

  4. Add $(OutDir)include to your project's C/C++ -> General -> Additional Include Directories;

  5. Add $(OutDir) to your project's Linker -> General -> Additional Library Directories;

  6. Add MMKV.lib to your project's Linker -> Input -> Additional Dependencies;

  7. Add #include <MMKV/MMKV.h> to your source file and we are done.

note:

  1. MMKV is compiled with MT/MTd runtime by default. If your project uses MD/MDd, you should change MMKV's setting to match your project's (C/C++ -> Code Generation -> Runtime Library), or vise versa.
  2. MMKV is developed with Visual Studio 2017, change the Platform Toolset if you use a different version of Visual Studio.

For other installation options, see Win32 Setup.

Quick Tutorial

You can use MMKV as you go. All changes are saved immediately, no sync, no save calls needed.
Setup MMKV on App startup, say in your main(), add these lines:

#include <MMKV/MMKV.h>

int main() {
    std::wstring rootDir = getYourAppDocumentDir();
    MMKV::initializeMMKV(rootDir);
    //...
}

MMKV has a global instance, that can be used directly:

auto mmkv = MMKV::defaultMMKV();

mmkv->set(true, "bool");
std::cout << "bool = " << mmkv->getBool("bool") << std::endl;

mmkv->set(1024, "int32");
std::cout << "int32 = " << mmkv->getInt32("int32") << std::endl;

mmkv->set("Hello, MMKV for Win32", "string");
std::string result;
mmkv->getString("string", result);
std::cout << "string = " << result << std::endl;

MMKV also supports Multi-Process Access. Full tutorials can be found here Win32 Tutorial.

MMKV for POSIX

Features

  • Efficient. MMKV uses mmap to keep memory synced with file, and protobuf to encode/decode values, making the most of POSIX to achieve best performance.

    • Multi-Process concurrency: MMKV supports concurrent read-read and read-write access between processes.
  • Easy-to-use. You can use MMKV as you go. All changes are saved immediately, no save, no sync calls needed.

  • Small.

    • A handful of files: MMKV contains process locks, encode/decode helpers and mmap logics and nothing more. It's really tidy.
    • About 7K in binary size: MMKV adds about 7K on application size, and much less when zipped.

Getting Started

Installation Via CMake

  1. Getting source code from git repository:

    git clone https://github.com/Tencent/MMKV.git
    
  2. Edit your CMakeLists.txt, add those lines:

    add_subdirectory(mmkv/POSIX/src mmkv)
    target_link_libraries(MyApp
        mmkv)
  3. Add #include "MMKV.h" to your source file and we are done.

For other installation options, see POSIX Setup.

Quick Tutorial

You can use MMKV as you go. All changes are saved immediately, no sync, no save calls needed.
Setup MMKV on App startup, say in your main(), add these lines:

#include "MMKV.h"

int main() {
    std::string rootDir = getYourAppDocumentDir();
    MMKV::initializeMMKV(rootDir);
    //...
}

MMKV has a global instance, that can be used directly:

auto mmkv = MMKV::defaultMMKV();

mmkv->set(true, "bool");
std::cout << "bool = " << mmkv->getBool("bool") << std::endl;

mmkv->set(1024, "int32");
std::cout << "int32 = " << mmkv->getInt32("int32") << std::endl;

mmkv->set("Hello, MMKV for Win32", "string");
std::string result;
mmkv->getString("string", result);
std::cout << "string = " << result << std::endl;

MMKV also supports Multi-Process Access. Full tutorials can be found here POSIX Tutorial.

License

MMKV is published under the BSD 3-Clause license. For details check out the LICENSE.TXT.

Change Log

Check out the CHANGELOG.md for details of change history.

Contributing

If you are interested in contributing, check out the CONTRIBUTING.md, also join our Tencent OpenSource Plan.

To give clarity of what is expected of our members, MMKV has adopted the code of conduct defined by the Contributor Covenant, which is widely used. And we think it articulates our values well. For more, check out the Code of Conduct.

FAQ & Feedback

Check out the FAQ first. Should there be any questions, don't hesitate to create issues.

Similar Resources

Allows to swap the Fn key and left Control key and other tweaks on Macbook Pro and Apple keyboards in GNU/Linux

A patched hid-apple kernel module UPDATE August 2020: swap_fn_leftctrl is now built-in in Linux 5.8 🎉 UPDATE Jun 2020: New feature added (swap_fn_f13

Nov 9, 2022

📃 Export WeChat chat histories to HTML files.

📃 Export WeChat chat histories to HTML files.

wechat-export Export WeChat chat histories to HTML files. Preview This script generates a HTML file for each contact's chat history. Currently it supp

Nov 21, 2022

PlotFS is a fuse filesystem for efficient storage of Chia plot files.

PlotFS PlotFS is a fuse filesystem for efficient storage of Chia plot files. PlotFS is not a traditional filesystem. It is mounted read only for farmi

Nov 8, 2022

Signed - a 3D modeling and construction language based on Lua and SDFs. Signed will be available for macOS and iOS and is heavily optimized for Metal.

Signed - a 3D modeling and construction language based on Lua and SDFs. Signed will be available for macOS and iOS and is heavily optimized for Metal.

Signed - A 3D modeling language Abstract Signed is a Lua based 3D modeling language, it provides a unique way to create high quality 3D content for yo

Jul 4, 2022

⌨️ Personal key mapping for The Key.

⌨️ Personal key mapping for The Key.

The Key Personal key mapping for The Key. This firmware configures: The first key to be the mute key on single tap, and the pause/play key on double t

Dec 25, 2021

An easy to build CO2 Monitor/Meter with Android and iOS App for real time visualization and charting of air data, data logger, a variety of communication options (BLE, WIFI, MQTT, ESP-Now) and many supported sensors.

An easy to build CO2 Monitor/Meter with Android and iOS App for real time visualization and charting of air data, data logger, a variety of communication options (BLE, WIFI, MQTT, ESP-Now) and many supported sensors.

CO2-Gadget An easy to build CO2 Monitor/Meter with cell phone App for real time visualization and charting of air data, datalogger, a variety of commu

Nov 15, 2022

Utility to install kexts, Frameworks and PrivateFrameworks in the System of macOS. For macOS Monterey 12 and Big Sur 11

Utility to install kexts, Frameworks and PrivateFrameworks in the System of macOS. For macOS Monterey 12 and Big Sur 11

Command-Line-SnapShot-Mounter Credit: chris1111 Apple This utility uses the macOS terminal Command Line SnapShot Mounter is an utility that allows you

Oct 14, 2022

🗺️ OMAPS.APP — Offline OpenStreetMap maps for iOS and Android. A community-driven fork of MAPS.ME.

🗺️ OMAPS.APP — Offline OpenStreetMap maps for iOS and Android. A community-driven fork of MAPS.ME.

OMaps is an open source cross-platform offline maps application, built on top of crowd-sourced OpenStreetMap data. It was publicly released for iOS and Android.

Nov 17, 2022

Macos-arm64-emulation - A guide for emulating macOS arm64e on an x86-based host.

macos-arm64-emulation Use the following guide to download and configure all of the necessary tools and files for emulating the macOS arm64e kernel. Th

Nov 22, 2022
Comments
  • FlutterPluginRegistrant 位置及“”问题

    FlutterPluginRegistrant 位置及“”问题

    Note:

    The language of MMKV

    flutter

    The version of MMKV

    v1.2.12

    The platform of MMKV

    iOS

    The installation of MMKV

    Cocoapods

    What's the issue?

    flutter demo project, ”FlutterPluginRegistrant“ path is ‘.ios/flutter/FlutterPluginRegistrant/FlutterPluginRegistrant.podspec’ and FlutterPluginRegistrant content is dependce "mmkv"

    What's the log of MMKV when that happened?

  • Run mmkv demo but crash on android emulator( API 16, armeabi-v7a)

    Run mmkv demo but crash on android emulator( API 16, armeabi-v7a)

    2021-11-12 02:33:39.924 890-1322/system_process I/ActivityManager: START {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 cmp=com.tencent.mmkvdemo/.MainActivity u=0} from pid 1741 2021-11-12 02:33:39.974 653-653/? D/PermissionCache: checking android.permission.READ_FRAME_BUFFER for uid=1000 => granted (1109 us) 2021-11-12 02:33:40.074 1741-1741/? D/AndroidRuntime: Shutting down VM 2021-11-12 02:33:40.094 1741-1754/? I/AndroidRuntime: NOTE: attach of thread 'Binder_3' failed 2021-11-12 02:33:40.094 1741-1745/? D/dalvikvm: GC_CONCURRENT freed 102K, 77% free 489K/2048K, paused 2ms+1ms, total 17ms 2021-11-12 02:33:40.104 1741-1747/? D/jdwp: Got wake-up signal, bailing out of select 2021-11-12 02:33:40.104 1741-1747/? D/dalvikvm: Debugger has detached; object registry had 1 entries 2021-11-12 02:33:40.114 653-653/? D/gralloc_ranchu: gralloc_alloc: Creating ashmem region of size 2260992 2021-11-12 02:33:40.144 1382-1384/com.android.launcher D/dalvikvm: GC_CONCURRENT freed 2852K, 29% free 13358K/18695K, paused 71ms+56ms, total 279ms 2021-11-12 02:33:40.144 1382-1664/com.android.launcher D/dalvikvm: WAIT_FOR_CONCURRENT_GC blocked 235ms 2021-11-12 02:33:40.154 1382-1625/com.android.launcher D/dalvikvm: WAIT_FOR_CONCURRENT_GC blocked 213ms 2021-11-12 02:33:40.154 1382-1665/com.android.launcher D/dalvikvm: WAIT_FOR_CONCURRENT_GC blocked 202ms 2021-11-12 02:33:40.224 1755-1755/? D/dalvikvm: Not late-enabling CheckJNI (already on) 2021-11-12 02:33:40.234 890-902/system_process I/ActivityManager: Start proc com.tencent.mmkvdemo for activity com.tencent.mmkvdemo/.MainActivity: pid=1755 uid=10044 gids={1028} 2021-11-12 02:33:40.584 890-1006/system_process I/qtaguid: Failed write_ctrl(s 1 10044) res=-1 errno=1 2021-11-12 02:33:40.584 890-1006/system_process W/NetworkManagementSocketTagger: setKernelCountSet(10044, 1) failed with errno -1 2021-11-12 02:33:40.674 1755-1755/? E/Trace: error opening trace file: No such file or directory (2) 2021-11-12 02:33:40.854 1755-1755/? I/ActivityThread: Pub com.tencent.mmkvdemo.MMKVContentProvider: com.tencent.mmkv.MMKVContentProvider 2021-11-12 02:33:40.904 1755-1755/? I/MMKV: Enable checkProcessMode() 2021-11-12 02:33:40.924 1755-1755/? D/dalvikvm: DexOpt: couldn't find static field Landroid/os/Build;.SUPPORTED_ABIS 2021-11-12 02:33:40.924 1755-1755/? W/dalvikvm: VFY: unable to resolve static field 183 (SUPPORTED_ABIS) in Landroid/os/Build; 2021-11-12 02:33:40.924 1755-1755/? D/dalvikvm: VFY: replacing opcode 0x62 at 0x0006 2021-11-12 02:33:40.954 1755-1755/? D/dalvikvm: DexOpt: couldn't find field Landroid/content/pm/ApplicationInfo;.splitSourceDirs 2021-11-12 02:33:40.954 1755-1755/? W/dalvikvm: VFY: unable to resolve instance field 48 2021-11-12 02:33:40.954 1755-1755/? D/dalvikvm: VFY: replacing opcode 0x54 at 0x000c 2021-11-12 02:33:40.974 1755-1755/? D/dalvikvm: Trying to load lib /data/data/com.tencent.mmkvdemo/lib/libmmkv.so 0xaebc5330 2021-11-12 02:33:41.024 1755-1755/? D/dalvikvm: Added shared lib /data/data/com.tencent.mmkvdemo/lib/libmmkv.so 0xaebc5330 2021-11-12 02:33:41.044 1755-1755/? I/MMKV: native-bridge.cpp:104::JNI_OnLoad current API level = 16, libc++_shared=0 2021-11-12 02:33:41.054 1755-1755/? I/MMKV: MMKV.cpp:165::initialize version v1.2.11, page size 4096, arch armeabi-v7a/NEON 2021-11-12 02:33:41.064 1755-1755/? A/libc: Fatal signal 4 (SIGILL) at 0xa5923b6a (code=1), thread 1755 (encent.mmkvdemo) 2021-11-12 02:33:41.104 1382-1382/com.android.launcher D/EGL_emulation: eglMakeCurrent: 0xb7dda768: ver 2 0 2021-11-12 02:33:41.144 1382-1625/com.android.launcher D/dalvikvm: GC_FOR_ALLOC freed 1272K, 27% free 13746K/18695K, paused 620ms, total 642ms 2021-11-12 02:33:41.194 651-651/? I/DEBUG: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** 2021-11-12 02:33:41.194 651-651/? I/DEBUG: Build fingerprint: 'generic/sdk/generic:4.1.2/MASTER/4875369:eng/test-keys' 2021-11-12 02:33:41.204 651-651/? I/DEBUG: pid: 1755, tid: 1755, name: encent.mmkvdemo >>> com.tencent.mmkvdemo <<< 2021-11-12 02:33:41.214 651-651/? I/DEBUG: signal 4 (SIGILL), code 1 (ILL_ILLOPC), fault addr a5923b6a 2021-11-12 02:33:41.264 1382-1382/com.android.launcher D/EGL_emulation: eglMakeCurrent: 0xb7dda768: ver 2 0 2021-11-12 02:33:41.304 890-897/system_process I/dalvikvm: Jit: resizing JitTable from 4096 to 8192 2021-11-12 02:33:41.514 651-651/? I/DEBUG: r0 b7cfd3b8 r1 b7cfd3aa r2 00000003 r3 00000000 2021-11-12 02:33:41.514 651-651/? I/DEBUG: r4 a594d0b0 r5 b7beb9e0 r6 00000000 r7 bee11678 2021-11-12 02:33:41.514 651-651/? I/DEBUG: r8 bee11704 r9 ab62acc4 sl b7beb9f0 fp bee1171c 2021-11-12 02:33:41.514 651-651/? I/DEBUG: ip c0000000 sp bee115d8 lr b6f86a7d pc a5923b6a cpsr 00000170 2021-11-12 02:33:41.514 651-651/? I/DEBUG: d0 000000a043200000 d1 3ff0000043200000 2021-11-12 02:33:41.534 651-651/? I/DEBUG: d2 bfd3441350baf6de d3 4008000000000000 2021-11-12 02:33:41.534 651-651/? I/DEBUG: d4 3fcef049fb9094d1 d5 3f40000000000000 2021-11-12 02:33:41.534 651-651/? I/DEBUG: d6 3fe999999999999a d7 000000a000000000 2021-11-12 02:33:41.534 651-651/? I/DEBUG: d8 0000000000000000 d9 0000000000000000 2021-11-12 02:33:41.534 651-651/? I/DEBUG: d10 0000000000000000 d11 0000000000000000 2021-11-12 02:33:41.534 651-651/? I/DEBUG: d12 0000000000000000 d13 0000000000000000 2021-11-12 02:33:41.544 651-651/? I/DEBUG: d14 0000000000000000 d15 0000000000000000 2021-11-12 02:33:41.544 651-651/? I/DEBUG: scr 60000010 2021-11-12 02:33:41.544 651-651/? I/DEBUG: backtrace: 2021-11-12 02:33:41.554 651-651/? I/DEBUG: #00 pc 00051b6a /data/data/com.tencent.mmkvdemo/lib/libmmkv.so (mmkv::mkPath(std::__ndk1::basic_string<char, std::__ndk1::char_traits, std::__ndk1::allocator > const&)+29) 2021-11-12 02:33:41.554 651-651/? I/DEBUG: #01 pc 00022a79 /system/lib/libc.so (strdup+24) 2021-11-12 02:33:41.554 651-651/? I/DEBUG: #02 pc 0000001c 2021-11-12 02:33:41.564 651-651/? I/DEBUG: stack: 2021-11-12 02:33:41.564 651-651/? I/DEBUG: bee11598 bee115b0 [stack] 2021-11-12 02:33:41.564 651-651/? I/DEBUG: bee1159c a594d0b0 /data/data/com.tencent.mmkvdemo/lib/libmmkv.so 2021-11-12 02:33:41.574 651-651/? I/DEBUG: bee115a0 0000002b
    2021-11-12 02:33:41.574 651-651/? I/DEBUG: bee115a4 b7cfd380 [heap] 2021-11-12 02:33:41.574 651-651/? I/DEBUG: bee115a8 bee11678 [stack] 2021-11-12 02:33:41.574 651-651/? I/DEBUG: bee115ac bee11704 [stack] 2021-11-12 02:33:41.574 651-651/? I/DEBUG: bee115b0 ab62acc4
    2021-11-12 02:33:41.574 651-651/? I/DEBUG: bee115b4 b7beb9f0 [heap] 2021-11-12 02:33:41.584 651-651/? I/DEBUG: bee115b8 bee1171c [stack] 2021-11-12 02:33:41.584 651-651/? I/DEBUG: bee115bc b7cfd3b8 [heap] 2021-11-12 02:33:41.584 651-651/? I/DEBUG: bee115c0 b7cfd3b8 [heap] 2021-11-12 02:33:41.584 651-651/? I/DEBUG: bee115c4 b6f86a7d /system/lib/libc.so (strdup+28) 2021-11-12 02:33:41.584 651-651/? I/DEBUG: bee115c8 a594d0b0 /data/data/com.tencent.mmkvdemo/lib/libmmkv.so 2021-11-12 02:33:41.594 651-651/? I/DEBUG: bee115cc b7beb9e0 [heap] 2021-11-12 02:33:41.594 651-651/? I/DEBUG: bee115d0 df0027ad
    2021-11-12 02:33:41.594 651-651/? I/DEBUG: bee115d4 00000000
    2021-11-12 02:33:41.604 651-651/? I/DEBUG: #00 bee115d8 a594e315 /data/data/com.tencent.mmkvdemo/lib/libmmkv.so 2021-11-12 02:33:41.604 651-651/? I/DEBUG: ........ ........ 2021-11-12 02:33:41.604 651-651/? I/DEBUG: #01 bee115d8 a594e315 /data/data/com.tencent.mmkvdemo/lib/libmmkv.so 2021-11-12 02:33:41.604 651-651/? I/DEBUG: bee115dc ffffffef
    2021-11-12 02:33:41.604 651-651/? I/DEBUG: bee115e0 0000002a
    2021-11-12 02:33:41.614 651-651/? I/DEBUG: bee115e4 00000020
    2021-11-12 02:33:41.614 651-651/? I/DEBUG: #02 bee115e8 0000000a
    2021-11-12 02:33:41.614 651-651/? I/DEBUG: bee115ec a594e314 /data/data/com.tencent.mmkvdemo/lib/libmmkv.so 2021-11-12 02:33:41.614 651-651/? I/DEBUG: bee115f0 00e11618
    2021-11-12 02:33:41.624 651-651/? I/DEBUG: bee115f4 00000014
    2021-11-12 02:33:41.624 651-651/? I/DEBUG: bee115f8 0000002a
    2021-11-12 02:33:41.624 651-651/? I/DEBUG: bee115fc b7cfd3b8 [heap] 2021-11-12 02:33:41.624 651-651/? I/DEBUG: bee11600 a594e314 /data/data/com.tencent.mmkvdemo/lib/libmmkv.so 2021-11-12 02:33:41.624 651-651/? I/DEBUG: bee11604 a594d0b0 /data/data/com.tencent.mmkvdemo/lib/libmmkv.so 2021-11-12 02:33:41.634 651-651/? I/DEBUG: bee11608 b7beb9e0 [heap] 2021-11-12 02:33:41.634 651-651/? I/DEBUG: bee1160c 00000000
    2021-11-12 02:33:41.634 651-651/? I/DEBUG: bee11610 bee11658 [stack] 2021-11-12 02:33:41.634 651-651/? I/DEBUG: bee11614 a590a2cf /data/data/com.tencent.mmkvdemo/lib/libmmkv.so (std::__ndk1::basic_string<char, std::__ndk1::char_traits, std::__ndk1::allocator >::assign(char const*, unsigned int)+158) 2021-11-12 02:33:41.644 651-651/? I/DEBUG: bee11618 00000000
    2021-11-12 02:33:41.644 651-651/? I/DEBUG: bee1161c 00000000
    2021-11-12 02:33:41.644 651-651/? I/DEBUG: bee11620 0000002a
    2021-11-12 02:33:41.644 651-651/? I/DEBUG: bee11624 b7cfd348 [heap] 2021-11-12 02:33:41.644 651-651/? I/DEBUG: memory near r0: 2021-11-12 02:33:41.654 1382-1384/com.android.launcher D/dalvikvm: GC_CONCURRENT freed 4679K, 41% free 11051K/18695K, paused 62ms+6ms, total 249ms 2021-11-12 02:33:41.654 651-651/? I/DEBUG: b7cfd398 64766b6d 2f6f6d65 656c6966 6d6d2f73 mkvdemo/files/mm 2021-11-12 02:33:41.654 1382-1625/com.android.launcher D/dalvikvm: WAIT_FOR_CONCURRENT_GC blocked 145ms 2021-11-12 02:33:41.664 651-651/? I/DEBUG: b7cfd3a8 6200766b 37762d69 454e2f61 0000003b kv.bi-v7a/NE;... 2021-11-12 02:33:41.664 651-651/? I/DEBUG: b7cfd3b8 7461642f 61642f61 632f6174 742e6d6f /data/data/com.t 2021-11-12 02:33:41.664 651-651/? I/DEBUG: b7cfd3c8 65636e65 6d2e746e 64766b6d 2f6f6d65 encent.mmkvdemo/ 2021-11-12 02:33:41.664 651-651/? I/DEBUG: b7cfd3d8 656c6966 6d6d2f73 0000766b 00000000 files/mmkv...... 2021-11-12 02:33:41.664 651-651/? I/DEBUG: memory near r1: 2021-11-12 02:33:41.664 651-651/? I/DEBUG: b7cfd388 632f6174 742e6d6f 65636e65 6d2e746e ta/com.tencent.m 2021-11-12 02:33:41.664 651-651/? I/DEBUG: b7cfd398 64766b6d 2f6f6d65 656c6966 6d6d2f73 mkvdemo/files/mm 2021-11-12 02:33:41.674 651-651/? I/DEBUG: b7cfd3a8 6200766b 37762d69 454e2f61 0000003b kv.bi-v7a/NE;... 2021-11-12 02:33:41.674 651-651/? I/DEBUG: b7cfd3b8 7461642f 61642f61 632f6174 742e6d6f /data/data/com.t 2021-11-12 02:33:41.674 651-651/? I/DEBUG: b7cfd3c8 65636e65 6d2e746e 64766b6d 2f6f6d65 encent.mmkvdemo/ 2021-11-12 02:33:41.674 651-651/? I/DEBUG: memory near r4: 2021-11-12 02:33:41.674 651-651/? I/DEBUG: a594d090 00000000 00000000 00000000 00000000 ................ 2021-11-12 02:33:41.674 651-651/? I/DEBUG: a594d0a0 00000000 00000000 00000000 00000000 ................ 2021-11-12 02:33:41.684 651-651/? I/DEBUG: a594d0b0 b6fb4a4c a594e2dc a594e320 a594e368 LJ...... ...h... 2021-11-12 02:33:41.684 651-651/? I/DEBUG: a594d0c0 a58fda39 a594bf30 a5930019 a594bf1c 9...0........... 2021-11-12 02:33:41.684 651-651/? I/DEBUG: a594d0d0 a594e314 a58fff63 a594e30c a594e310 ....c........... 2021-11-12 02:33:41.684 651-651/? I/DEBUG: memory near r5: 2021-11-12 02:33:41.684 651-651/? I/DEBUG: b7beb9c0 00000000 00000000 00000000 00000000 ................ 2021-11-12 02:33:41.694 651-651/? I/DEBUG: b7beb9d0 00000000 00000000 00000000 00000453 ............S... 2021-11-12 02:33:41.694 651-651/? I/DEBUG: b7beb9e0 a96eb454 ab62acc4 aa8cc718 a594f000 T.n...b......... 2021-11-12 02:33:41.694 651-651/? I/DEBUG: b7beb9f0 00000001 9bbacc62 bee11850 00000000 ....b...P....... 2021-11-12 02:33:41.694 651-651/? I/DEBUG: b7beba00 bee11884 00000001 00000000 b685afc0 ................ 2021-11-12 02:33:41.704 651-651/? I/DEBUG: memory near r7: 2021-11-12 02:33:41.704 651-651/? I/DEBUG: bee11658 bee11678 a5903c9d a594d0b0 0000002a x....<......... 2021-11-12 02:33:41.704 651-651/? I/DEBUG: bee11668 b7cfd348 a594e314 bee116e0 9bbacc62 H...........b... 2021-11-12 02:33:41.704 651-651/? I/DEBUG: bee11678 bee116a0 a5903c1d bee116a0 a5900339 .....<......9... 2021-11-12 02:33:41.704 651-651/? I/DEBUG: bee11688 bee116a0 0000002a a594e314 a594e314 ............... 2021-11-12 02:33:41.714 651-651/? I/DEBUG: bee11698 00000001 bee116e0 bee116f8 a58fe45b ............[... 2021-11-12 02:33:41.714 651-651/? I/DEBUG: memory near r8: 2021-11-12 02:33:41.714 651-651/? I/DEBUG: bee116e4 0000002a b7cfd348 9bbacc62 aa8ccd70 ...H...b...p... 2021-11-12 02:33:41.714 651-651/? I/DEBUG: bee116f4 00000000 ab62acd0 b685ae34 00000001 ......b.4....... 2021-11-12 02:33:41.714 651-651/? I/DEBUG: bee11704 b68858a3 ab62acc4 00000001 aebe5ae8 .X....b......Z.. 2021-11-12 02:33:41.714 651-651/? I/DEBUG: bee11714 a5dd263e aebbfe74 b6889e6b ab62acc4 >&..t...k.....b. 2021-11-12 02:33:41.714 651-651/? I/DEBUG: bee11724 a5dd263a a58fe409 b7beb9f0 c8c00019 :&.............. 2021-11-12 02:33:41.724 651-651/? I/DEBUG: memory near r9: 2021-11-12 02:33:41.724 651-651/? I/DEBUG: ab62aca4 00000000 00000001 aebe56e8 ab62ace4 .........V....b. 2021-11-12 02:33:41.724 651-651/? I/DEBUG: ab62acb4 a5ba77fa aa8ccd70 00000006 00000000 .w..p........... 2021-11-12 02:33:41.734 651-651/? I/DEBUG: ab62acc4 4c20001d 79300021 00000001 ab62ad18 .. L!.0y......b. 2021-11-12 02:33:41.734 651-651/? I/DEBUG: ab62acd4 a5ba7a3a aa8cc718 a5ba77fa 00000000 :z.......w...... 2021-11-12 02:33:41.734 651-651/? I/DEBUG: ab62ace4 00000001 aebe6ba0 00000000 aebe6c28 .....k......(l.. 2021-11-12 02:33:41.734 651-651/? I/DEBUG: memory near sl: 2021-11-12 02:33:41.734 651-651/? I/DEBUG: b7beb9d0 00000000 00000000 00000000 00000453 ............S... 2021-11-12 02:33:41.734 651-651/? I/DEBUG: b7beb9e0 a96eb454 ab62acc4 aa8cc718 a594f000 T.n...b......... 2021-11-12 02:33:41.734 651-651/? I/DEBUG: b7beb9f0 00000001 9bbacc62 bee11850 00000000 ....b...P....... 2021-11-12 02:33:41.744 651-651/? I/DEBUG: b7beba00 bee11884 00000001 00000000 b685afc0 ................ 2021-11-12 02:33:41.744 651-651/? I/DEBUG: b7beba10 00000000 00000000 aa05f570 ab625300 ........p....Sb. 2021-11-12 02:33:41.744 651-651/? I/DEBUG: memory near fp: 2021-11-12 02:33:41.744 651-651/? I/DEBUG: bee116fc b685ae34 00000001 b68858a3 ab62acc4 4........X....b. 2021-11-12 02:33:41.744 651-651/? I/DEBUG: bee1170c 00000001 aebe5ae8 a5dd263e aebbfe74 .....Z..>&..t... 2021-11-12 02:33:41.754 651-651/? I/DEBUG: bee1171c b6889e6b ab62acc4 a5dd263a a58fe409 k.....b.:&...... 2021-11-12 02:33:41.754 651-651/? I/DEBUG: bee1172c b7beb9f0 c8c00019 00000000 b7beb9e0 ................ 2021-11-12 02:33:41.754 651-651/? I/DEBUG: bee1173c b6fb4a4c bee117a8 00000000 ab62ac9c LJ............b. 2021-11-12 02:33:41.754 651-651/? I/DEBUG: memory near sp: 2021-11-12 02:33:41.754 651-651/? I/DEBUG: bee115b8 bee1171c b7cfd3b8 b7cfd3b8 b6f86a7d ............}j.. 2021-11-12 02:33:41.754 651-651/? I/DEBUG: bee115c8 a594d0b0 b7beb9e0 df0027ad 00000000 .........'...... 2021-11-12 02:33:41.764 651-651/? I/DEBUG: bee115d8 a594e315 ffffffef 0000002a 00000020 ........... ... 2021-11-12 02:33:41.764 651-651/? I/DEBUG: bee115e8 0000000a a594e314 00e11618 00000014 ................ 2021-11-12 02:33:41.764 651-651/? I/DEBUG: bee115f8 0000002a b7cfd3b8 a594e314 a594d0b0 ............... 2021-11-12 02:33:41.764 651-651/? I/DEBUG: code around pc: 2021-11-12 02:33:41.764 651-651/? I/DEBUG: a5923b48 00029586 466fb580 4962b0a8 68094479 ......oF..bIyD.h 2021-11-12 02:33:41.774 651-651/? I/DEBUG: a5923b58 91276809 980a900a f85cf7da e80ef7d9 .h'............ 2021-11-12 02:33:41.774 651-651/? I/DEBUG: a5923b68 efc09009 20640050 460aa90c 0ac0f942 ....P.d ...FB... 2021-11-12 02:33:41.774 651-651/? I/DEBUG: a5923b78 60102000 0250f101 0acff942 0240f101 . .`[email protected] 2021-11-12 02:33:41.774 651-651/? I/DEBUG: a5923b88 0acff942 0230f101 0acff942 0220f101 B.....0.B..... . 2021-11-12 02:33:41.774 651-651/? I/DEBUG: code around lr: 2021-11-12 02:33:41.784 651-651/? I/DEBUG: b6f86a5c e7f14613 4606b570 eb36f7f4 46281c45 .F..p..F..6.E.(F 2021-11-12 02:33:41.784 651-651/? I/DEBUG: b6f86a6c fa56f7f4 b1184604 462a4631 eb78f7eb ..V..F..1FF..x. 2021-11-12 02:33:41.784 651-651/? I/DEBUG: b6f86a7c bd704620 f44fb510 4c037280 4621447c Fp...O..r.L|D!F 2021-11-12 02:33:41.784 651-651/? I/DEBUG: b6f86a8c f804f000 bd104620 00027c20 43f8e92d .... F.. |..-..C 2021-11-12 02:33:41.784 651-651/? I/DEBUG: b6f86a9c 46064615 f7f0460c 2200ff35 4b296803 .F.F.F..5..".h)K 2021-11-12 02:33:41.784 651-651/? I/DEBUG: memory map around fault addr a5923b6a: 2021-11-12 02:33:41.794 651-651/? I/DEBUG: (no map below) 2021-11-12 02:33:41.794 651-651/? I/DEBUG: a58d2000-a594b000 /data/data/com.tencent.mmkvdemo/lib/libmmkv.so 2021-11-12 02:33:41.794 651-651/? I/DEBUG: a594b000-a594e000 /data/data/com.tencent.mmkvdemo/lib/libmmkv.so 2021-11-12 02:33:41.984 890-1006/system_process I/qtaguid: Failed write_ctrl(s 0 10044) res=-1 errno=1 2021-11-12 02:33:41.984 890-1006/system_process W/NetworkManagementSocketTagger: setKernelCountSet(10044, 0) failed with errno -1 2021-11-12 02:33:41.984 890-1076/system_process I/ActivityManager: Process com.tencent.mmkvdemo (pid 1755) has died. 2021-11-12 02:33:41.994 890-1076/system_process W/ActivityManager: Force removing ActivityRecord{aec2f748 com.tencent.mmkvdemo/.MainActivity}: app died, no saved state 2021-11-12 02:33:42.014 654-654/? D/Zygote: Process 1755 terminated by signal (4) 2021-11-12 02:33:42.144 1382-1382/com.android.launcher D/EGL_emulation: eglMakeCurrent: 0xb7dda768: ver 2 0 2021-11-12 02:33:42.144 1382-1382/com.android.launcher E/EGL_emulation: tid 1382: eglSurfaceAttrib(1199): error 0x3009 (EGL_BAD_MATCH) 2021-11-12 02:33:42.144 1382-1382/com.android.launcher W/HardwareRenderer: Backbuffer cannot be preserved

  • Func 'doFullWriteBack' in place update mmap file,  will corrupt file when func is not finished but  process exit.

    Func 'doFullWriteBack' in place update mmap file, will corrupt file when func is not finished but process exit.

      memmoveDictionary
    ----
      vec.reserve(dic.size());
       or (auto &itr : dic) {
            vec.push_back(&itr.second);
      }
    

    Dict is written back follow the vec order. When crashed in the middle, recoverd key value pairs in the file are not follow the order user set it, may contain some old value and some new value, but lost the others.

    So unfinished write back may put the key value pairs in a crazy state silently.

  • Add flutter test, please!

    Add flutter test, please!

    Note:

    no

    The language of MMKV

    dart, flutter

    The version of MMKV

    latest

    The platform of MMKV

    no

    The installation of MMKV

    flutter

    What's the issue?

    Awesome project! Add flutter test, make it better, please!

    What's the log of MMKV when that happened?

    no

Filament is a real-time physically based rendering engine for Android, iOS, Windows, Linux, macOS, and WebGL2
Filament is a real-time physically based rendering engine for Android, iOS, Windows, Linux, macOS, and WebGL2

Filament Filament is a real-time physically based rendering engine for Android, iOS, Linux, macOS, Windows, and WebGL. It is designed to be as small a

Nov 25, 2022
A cross-platform (Android/iOS/Windows/macOS) cronet plugin for Flutter via `dart:ffi`

cronet_flutter A cross-platform (Android/iOS/Windows/macOS) cronet plugin for Flutter via dart:ffi

Nov 9, 2022
Nov 13, 2022
Oxygine is C++ engine and framework for 2D games on iOS, Android, Windows, Linux and Mac

BUILD AND RUN See oxygine-framework/readme/ folder. It has instructions on how to build and run oxygine on different platforms. Wiki available at http

Nov 11, 2022
A customized LGL Android mod menu, containing ESP only for PUBG Mobile 1.3.0 for Android
A customized LGL Android mod menu, containing ESP only for PUBG Mobile 1.3.0 for Android

PUBG Mobile ESP Mod Menu A customized LGL mod menu, containing ESP only for PUBG Mobile 1.3.0 for Android. Everything are fixed so it works with both

Mar 19, 2022
Spacex Storage is an offchain storage work inspector of Mannheim Network running inside TEE enclave.

Spacex Storage Spacex Storage is an offchain storage work inspector of Mannheim Network running inside TEE enclave. Contribution Thank you for conside

Oct 21, 2022
A high performance, shared memory, lock free, cross platform, single file, no dependencies, C++11 key-value store
A high performance, shared memory, lock free, cross platform, single file, no dependencies, C++11 key-value store

SimDB A high performance, shared memory, lock free, cross platform, single file, no dependencies, C++11 key-value store. SimDB is part of LAVA (Live A

Nov 23, 2022
Sega Master System / Game Gear / SG-1000 emulator for iOS, macOS, Raspberry Pi, Windows, Linux, BSD and RetroArch.
Sega Master System / Game Gear / SG-1000 emulator for iOS, macOS, Raspberry Pi, Windows, Linux, BSD and RetroArch.

Gearsystem is a very accurate, cross-platform Sega Master System / Game Gear / SG-1000 emulator written in C++ that runs on Windows, macOS, Linux, BSD, iOS, Raspberry Pi and RetroArch.

Nov 21, 2022
Fix some extrinsic parameter importing problems. 6-axis IMU works now. Lidar without ring works now.

LVI-SAM-MODIFIED This repository is a modified version of LVI-SAM. Modification Add function to get extrinsic parameters.The original code assumes the

Nov 9, 2022