summaryrefslogtreecommitdiff
path: root/tests/memleak.php
blob: 9a5376f0d791a4b5a9e3cb6c865b98e53e93c8ae (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
<?php

declare(strict_types=1);

use Spiral\Goridge\StreamRelay;
use Spiral\RoadRunner\Worker as RoadRunner;

require __DIR__ . "/vendor/autoload.php";

$rr = new RoadRunner(new StreamRelay(\STDIN, \STDOUT));
$mem = '';
while($rr->waitPayload()){
    $mem .= str_repeat(" ", 1024*1024);
    $rr->send("");
}