Open vtsykun opened 6 months ago
STR
1) Run the script.
namespace AAA; $mem = new \ArrayObject([1, 2, 3]); $_SERVER = []; unset($argc, $argv); $fiber = new \Fiber(static function() use ($mem): void { echo "Run from the Fiber...\n"; while (true) { $i = 100; while ($i--) { $mem->offsetSet('a'.random_int(0, 2000000), 10); } echo "Count ". $mem->count() ."\n"; \Fiber::suspend(); } }); $mem = null; unset($mem); gc_collect_cycles(); $fiber->start(); $fiber->resume(); \meminfo_dump(\fopen('/tmp/mem_dump.json', 'w')); $fiber->resume();
Actual result: ArrayObject is missing in the memory dump. Expected result: ArrayObject must be persist in the memory dump
STR
1) Run the script.
Actual result: ArrayObject is missing in the memory dump. Expected result: ArrayObject must be persist in the memory dump
mem_dump.json
``` { "header" : { "memory_usage" : 397944, "memory_usage_real" : 2097152, "peak_memory_usage" : 431256, "peak_memory_usage_real" : 2097152 }, "items": { "0x7f5691e58200" : { "type" : "array", "size" : "72", "symbol_name" : "_GET", "is_root" : true, "frame" : "