Suppress guest explicit GC with universal transform version - #110
Merged
Conversation
10 tasks
H3nb
added a commit
that referenced
this pull request
Aug 27, 2026
Rewrite guest System.gc() and Runtime.gc() callsites to an advisory emulator bridge so repeated guest hints cannot force ART compacting collections. Replace timing-specific conversion metadata with a single universal transform version. Existing retained MIDlets reconvert automatically, and future transformer or bridge changes only need to increment that version.
H3nb
added a commit
that referenced
this pull request
Aug 28, 2026
Rewrite guest System.gc() and Runtime.gc() callsites to an advisory emulator bridge so repeated guest hints cannot force ART compacting collections. Replace timing-specific conversion metadata with a single universal transform version. Existing retained MIDlets reconvert automatically, and future transformer or bridge changes only need to increment that version.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
System.gc()andRuntime.gc()calls to an emulator-owned advisory bridgeJLMod-Transform-VersionmarkerRuntime.gc()receiver null semantics and keep normal ART allocation-pressure GC unchangedRoot cause
Green Farm calls
System.gc()repeatedly from guest bytecode. On the tested Android 16 / HyperOS host with target SDK 35+, ART honored those calls as concurrent mark-compact collections, causing visible loading stalls and frequent object-address relocation. This is independent of the Memory Editor implementation in #109 and independent of emulation speed.Universal reconversion contract
MidletTransformMetadata.TRANSFORM_VERSIONis now the single compatibility version for all converter output and runtime bridge contracts. Future transformer changes only need to increment this value. The existingAppReconverterpath will rebuild installed MIDlets with retained source before launch.Validation
MidletSystem.gcbridge overloads are retainedAutoReconversionActivityand producedJLMod-Transform-Version: 1System.gc()callsites