Optimize custom memory allocators
わかりやすく
独自のメモリマネージャ、ヒープ、またはスラブアロケータを実装しているアプリ、ゲームエンジン、ネイティブライブラリは、16 KB ページの推奨事項に従ってください。標準の Android アロケータ(scudo)を使用しているアプリは、このセクションを省略できます。
- このセクションは、アプリ、ゲームエンジン、またはネイティブライブラリが独自のメモリマネージャ、ヒープ、またはスラブアロケータを実装している場合にのみ適用されます。例: カスタムゲームエンジン、組み込みデータベース、jemalloc や mimalloc を組み込んだランタイム。
- 標準の Android メモリアロケータ(scudo)を使用しているアプリは、このセクションを省略できます。
- 16 KB システムでは、最小の物理メモリ単位が 4 KB システムの 4 倍になります。
- 4 KB を前提に設計されたアロケータは、小さなオブジェクトを複数の 16 KB ページに分散させ、空のメモリを保持する場合があります。その結果、RSS が増加し、ZRAM の効率が低下します。
- 独自のメモリプールを管理している場合は、次に続く推奨事項に従ってください。
公式テキストより
Note: This section applies only if your app, game engine, or native library implements a custom memory manager, heap, or slab allocator (such as in custom game engines, embedded databases, or runtimes embedding jemalloc or mimalloc). If your app uses the standard Android memory allocator (scudo), you can skip this …
公式テキスト全文を読む ↗ StoreRules ライブラリで開く アプリが準拠しているか質問する
変更履歴
StoreRules が追跡を始めてから実質的な変更はありません。
この条項に関する開発者の事例
まだ事例はありません。
この条項の下位条項
- 1. Avoid hard-coded byte thresholds for freeing memory
- 2. Fill up already-used pages first (dense-first allocation)
- 3. Align memory pools to 16 KB and keep pool sizes moderate
- 4. Release physical memory for cached large buffers immediately
- 5. Zero out memory on free instead of on allocation for ZRAM compression
- Summary of recommendations