MMKV is a high‑performance, mmap‑based key‑value component that uses protobuf for serialization, offering fast writes, incremental updates, space management, and data integrity checks, making it a superior alternative to NSUserDefaults for iOS applications.
This article explains Linux kernel memory management, covering process address space layout, memory allocation methods, OOM killer behavior, where different types of memory reside, and both manual and automatic memory reclamation techniques, illustrated with diagrams and command examples.
This article explains the Linux mmap system call, its usage, flags, error handling, related calls like munmap and msync, two shared‑memory techniques, and the underlying virtual‑address and vm_area_struct mechanisms that enable memory mapping.
This article explains how Tencent's Mars framework provides a cross‑platform, high‑performance logging module (xlog) for mobile apps, covering its architecture, the evolution from V1.0 to V2.0, mmap usage, compression, encryption, and practical implementation details.
This article examines the design of WeChat's cross‑platform XLog module, detailing how it balances performance, reliability, and security through memory buffering, mmap usage, and efficient compression to provide smooth, loss‑less logging for mobile applications.
This article examines the design of Mars's cross‑platform xlog module, explaining why traditional file‑based logging harms app smoothness, how memory buffering, mmap, and stream‑compression overcome performance and reliability issues, and what practical challenges remain on Android and iOS.
This talk details how Tencent's iOS engineers tackled SQLite performance bottlenecks by redesigning multithreaded concurrency, optimizing Busy Retry handling, leveraging WAL and mmap, and applying low‑level I/O and lock improvements, resulting in dramatic reductions in UI lag and CPU waste for heavy‑use users.
This article explains how the Linux free command reports memory usage, clarifies the roles of buffer cache and page cache, demonstrates which cache memory can be reclaimed, and shows practical tests using tmpfs, shared memory, and mmap with code examples.
This article demystifies the Linux free command, explains the distinction between buffer and page caches, shows how various caches are reclaimed—or not—through practical tests with tmpfs, shared memory, and mmap, and provides actionable tips for accurately interpreting memory usage on RHEL 6 systems.