gc_status php-src shape + gc_mem_caches MM cache (#9970, #9160) - #11324
Merged
Merged
Conversation
…#9970, #9160) Align gc_status() with Zend/php-src (runs, collected, threshold, roots only) via CycleCollector and GcStatusJitHelper; shrink GcStatusRuntime LLVM bridge. Model Zend MM cache bucket in MemoryAccounting so gc_mem_caches() returns non-zero on first call per request. 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
gc_status()now returns only php-src keys (runs,collected,threshold,roots) — removed extrarunning/protected/full/buffer_sizefrom VM SSOT (CycleCollector::status) and JIT bridge (GcStatusJitHelper,GcStatusRuntime).gc_mem_caches()returns non-zero on first call per request viaMemoryAccounting::INITIAL_MM_CACHE(65536-byte Zend MM bucket model);MemoryAccounting::beginRequest()seeds cache atRuntime::run()start.php-src reference
ext/standard/php_gc.c—PHP_FUNCTION(gc_status),PHP_FUNCTION(gc_mem_caches)Zend/zend_gc.c—zend_gc_status()Zend/zend_alloc.c— MM cache releasePHP implementation
lib/VM/CycleCollector.php— status shapelib/VM/MemoryAccounting.php— MM cache accountingext/standard/GcStatusJitHelper.php— JIT/AOT table builder (4 keys)lib/JIT/Builtin/GcStatusRuntime.php— LLVM bridge shrunk (~20 lines removed)Verification
Output:
Closes #9970
Closes #9160
Made with Cursor