mirror of
https://github.com/php/php-src.git
synced 2026-04-07 16:13:32 +02:00
When the memory limit is restored during shutdown, we may still be using a lot of memory. Ignore the failure at that point and set it again after the MM is shut down, at which point memory usage should be at its lowest point.
24 lines
405 B
PHP
24 lines
405 B
PHP
--TEST--
|
|
Bug #81104: Warning: "Failed to set memory limit to ... bytes" emitted after exit in debug
|
|
--INI--
|
|
memory_limit=5M
|
|
report_memleaks=0
|
|
--FILE--
|
|
<?php
|
|
class X {
|
|
public $x;
|
|
public function __construct() { $this->x = [$this]; }
|
|
}
|
|
gc_disable();
|
|
ini_set('memory_limit', '10M');
|
|
$y = [];
|
|
for ($i = 0; $i < 10000; $i++) {
|
|
$y[] = new X();
|
|
}
|
|
$y[0]->y = &$y;
|
|
|
|
?>
|
|
===DONE===
|
|
--EXPECT--
|
|
===DONE===
|