Repository navigation
php-in-php: route JIT memory_get_* through MemoryJitHelper PHP (#9377) - #10930
Merged
Merged
Conversation
Replace MemoryRuntime RSS/statm LLVM and emalloc globals with thin bridges to compiled MemoryJitHelper delegating to VmMemory/MemoryAccounting/VmGcStatus. Shrinks JitMemory peak-tracking LLVM; adds shrink guards and spine entry. Co-authored-by: Cursor <cursoragent@cursor.com>
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
ext/standard/MemoryJitHelper.phpas SSOT for JIT/AOTmemory_get_usage(),memory_get_peak_usage(),memory_reset_peak_usage(),gc_mem_caches(), and emallocnoteAlloc— delegating toVmMemory,MemoryAccounting, andVmGcStatus.lib/JIT/Builtin/MemoryRuntime.phpfrom ~360-line RSS/statm/emalloc LLVM monolith to thin ABI bridges (removed/proc/self/statmlibc LLVM, peak/current globals, inlinegc_mem_cacheshashtable math).ext/standard/JitMemory.php(~50% LOC) to call bridges instead of LLVM peak tracking.php-src ref:
ext/standard/basic_functions.c,ext/standard/php_gc.cCloses #9377
C/LLVM shrink
MemoryRuntime.php:emitReadRssBytes(libc open/read/strtol),emitReadEmallocBytes, inlineemitNoteAlloc, inlineensureGcMemCaches,__phpc_memory_peak_*/__phpc_memory_current_*globals,ensureLibcForStatm,cstringhelper (~200 LLVM lines removed).Verification
Made with Cursor