Skip to content

[FR]: Add MemoryBudgetManager sample #514

Open

Description

@WSixx

Is there an existing FR for this?

  • I have searched the existing issues

For which area is this FR?

General

Is it for a specific sample?

samples/performance/memory/src/main/java/com/example/platform/performance/memory/MemoryBudgetSample.kt

Describe the feature request

Add a sample module (:samples:performance:memory) demonstrating the Android 17 QPR2 (API level 37.2 / CINNAMON_BUN_2) MemoryBudgetManager API and <memory-budget> manifest declarations, following the official App memory budgets guide.

Scope:

  • On-demand memory usage and budget telemetry (processCurrentUsageBytes, packageCurrentUsageBytes, processBudgetBytes, packageBudgetBytes, and LIMIT_IS_DISABLED).
  • Discrete workload budget transitions (processBudgetBytes, clearProcessBudget(), idempotency, and IllegalArgumentException ceiling validation).
  • Lifecycle-aware OnOverBudgetListener registration (ON_START / ON_STOP) with fast, allocation-free high-yield LruCache<String, Bitmap> eviction.
  • Documentation for <memory-budget> manifest clauses, release-only usage, and adb inspection commands (dumpsys meminfo and dumpsys activity processes).

Code of Conduct

  • I agree to follow this project's Code of Conduct

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions