Optimize custom memory allocators
쉬운 설명
커스텀 메모리 관리자, 힙 또는 슬랩 할당자를 가진 앱, 게임 엔진 또는 네이티브 라이브러리는 16KB 페이지 권장 사항을 따라야 하며, 표준 Android 할당자(scudo)를 사용하는 앱은 이 섹션을 건너뛸 수 있습니다.
- 앱, 게임 엔진 또는 네이티브 라이브러리가 커스텀 메모리 관리자, 힙 또는 슬랩 할당자를 구현하는 경우에만 적용됩니다. 예: 커스텀 게임 엔진, 임베디드 데이터베이스, jemalloc 또는 mimalloc을 포함하는 런타임.
- 표준 Android 메모리 할당자(scudo)를 사용하는 앱은 이 섹션을 건너뛸 수 있습니다.
- 16KB 시스템에서는 가장 작은 물리 메모리 단위가 4KB 시스템보다 4배 큽니다.
- 4KB 가정에 맞춰 설계된 할당자는 작은 객체를 여러 16KB 페이지에 분산시키고 빈 메모리를 유지하여 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