Optimize custom memory allocators
In plain words
Apps, game engines or native libraries with a custom memory manager, heap or slab allocator should follow the recommendations for 16 KB pages; apps using the standard Android allocator (scudo) can skip this section.
- Applies only if your app, game engine or native library implements a custom memory manager, heap or slab allocator, e.g. custom game engines, embedded databases, or runtimes embedding jemalloc or mimalloc.
- Apps using the standard Android memory allocator (scudo) can skip this section.
- On 16 KB systems the smallest physical memory unit is four times larger than on 4 KB systems.
- An allocator designed around 4 KB assumptions can scatter small objects across several 16 KB pages and retain empty memory, raising RSS and degrading ZRAM efficiency.
- If your code manages its own memory pools, follow the recommendations that come next.
From the official text
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 …
Read the full official text ↗ Open in the StoreRules library Ask whether your app complies
Change history
No substantive change since StoreRules began tracking it.
Developers' cases about this clause
No cases yet.
Clauses under this one
- 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