Manuel Mausz wrote:
Rasmus Lerdorf wrote:
Note that you don't actually need to send the request.  It looks like
repeatedly doing:

$ch = curl_init();
curl_setopt($ch, CURLOPT_POSTFIELDS, $args);
curl_close($ch);

Is enough to do it.  Still looking at the code.  Seems like
zend_llist_clean(&ch->to_free.str); isn't doing the right thing somehow.

Is this really related to curl?

# php -n -r 'for($i=0;$i<10;$i++) { for($args="",$j=0;$j<75;$j++) $args
.= "a=$j&"; unset($args); echo memory_get_usage()."\n"; }'
55872
56100
56172
56240
56304
56364
56420
56420
56420
56420

Yeah, I noticed that as well as I was simplifying things down further and further. I have gotten to the point where my simplification has lost track of the real problem, I think. My original complicated code is leaking hundreds of K per iteration, and I assumed the smaller leak in the simplified version was representative of that, but I don't think it is. That would also why I haven't been able to find a bug in this curl code I have been looking at.

-Rasmus

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to