Re: [PHP-DEV] preg leak

2004-08-24 Thread George Schlossnagle
On Aug 24, 2004, at 7:51 PM, Jason wrote: Thanks for the feedback. A way to somehow limit the caching of expressions would be ideal, otherwise, the memory is lost forever with no way to reclaim it. I imagine a limited size cache which keeps only the most used expressions would be ideal. If anyone

Re: [PHP-DEV] preg leak

2004-08-24 Thread Rasmus Lerdorf
Andrei already fixed it. -Rasmus On Tue, 24 Aug 2004, Jason wrote: > Thanks for the feedback. > > A way to somehow limit the caching of expressions > would be ideal, otherwise, the memory is lost forever > with no way to reclaim it. I imagine a limited size > cache which keeps only the most use

Re: [PHP-DEV] preg leak

2004-08-24 Thread Jason
Thanks for the feedback. A way to somehow limit the caching of expressions would be ideal, otherwise, the memory is lost forever with no way to reclaim it. I imagine a limited size cache which keeps only the most used expressions would be ideal. If anyone can tell me which source file has the

Re: [PHP-DEV] preg leak

2004-08-24 Thread Ron Korving
FIFO, with the addition that one that's re-used, will be moved to the beginning of the list, would (I think) greatly benefit the cache hit-rate. Just my $0.02 Ron "Derrell Lipman" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Ilia Alshanetsky <[EMAIL PROTECTED]> writes: > > > Thi

Re: [PHP-DEV] preg leak

2004-08-24 Thread Derrell . Lipman
Ilia Alshanetsky <[EMAIL PROTECTED]> writes: > This is not a bug, but rather expected behavior. PCRE extension caches > compiled regular expressions so that subsequent runs of the same regex do > not need to perform the compilation step. In your example you are generating > new regex in an untermi

Re: [PHP-DEV] preg leak

2004-08-24 Thread John Coggeshall
Shouldn't you be able to disable that cache though? John On Tue, 2004-08-24 at 11:53, Ilia Alshanetsky wrote: > This is not a bug, but rather expected behavior. PCRE extension caches > compiled regular expressions so that subsequent runs of the same regex do not > need to perform the compilatio

Re: [PHP-DEV] preg leak

2004-08-24 Thread Ilia Alshanetsky
This is not a bug, but rather expected behavior. PCRE extension caches compiled regular expressions so that subsequent runs of the same regex do not need to perform the compilation step. In your example you are generating new regex in an unterminated loop, so it's no surprise that PHP eventually