Skip to content

Fix heap-size writing unrecognized hw.heapSize property#480

Open
jramism wants to merge 1 commit into
ReactiveCircus:mainfrom
jramism:fix/heap-size-vm-property
Open

Fix heap-size writing unrecognized hw.heapSize property#480
jramism wants to merge 1 commit into
ReactiveCircus:mainfrom
jramism:fix/heap-size-vm-property

Conversation

@jramism

@jramism jramism commented Jul 7, 2026

Copy link
Copy Markdown

Problem

The heap-size input is written to the AVD's config.ini as hw.heapSize:

if (heapSize) {
  configEntries.push(`hw.heapSize=${heapSize}`);
}

hw.heapSize is not a recognized AVD hardware property, so the value is
ignored and heap-size has no effect on the emulator.

The property that actually sets the per-app VM heap is vm.heapSize, as
defined in the SDK's emulator/lib/hardware-properties.ini:

name        = vm.heapSize
type        = integer
abstract    = Max VM application heap size
description = The maximum heap size a Dalvik application might allocate
              before being killed by the system. Value is in megabytes.

Fix

Write vm.heapSize instead of hw.heapSize. hw.ramSize (used for the
ram-size input) is already the correct property name and is left unchanged.

Related: #188

Notes

  • Only src/emulator-manager.ts and the compiled lib/emulator-manager.js
    change, matching the repo convention of committing both.
  • The change is a single token inside a template literal, so the compiled
    output is identical to tsc's.

The `heap-size` input is written to config.ini as `hw.heapSize`, which is
not a recognized AVD hardware property, so it has no effect on the emulator.

The SDK's `hardware-properties.ini` defines `vm.heapSize` ("Max VM
application heap size ... Value is in megabytes") as the property that sets
the per-app VM heap for the AVD. Write `vm.heapSize` so `heap-size` actually
takes effect. `hw.ramSize` (used for `ram-size`) is already correct and is
left unchanged.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant