Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:10662 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 53762 invoked by uid 1010); 20 Jun 2004 18:57:38 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 53707 invoked from network); 20 Jun 2004 18:57:38 -0000 Received: from unknown (HELO took.shire) (68.126.141.9) by pb1.pair.com with SMTP; 20 Jun 2004 18:57:38 -0000 Received: (qmail 41944 invoked by uid 1001); 20 Jun 2004 19:06:29 -0000 Date: Sun, 20 Jun 2004 19:06:29 +0000 To: internals@lists.php.net Message-ID: <20040620190629.GB80292@bagend.shire> Mail-Followup-To: internals@lists.php.net Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.1i Subject: [PATCH] pcre caching and memory From: curt@php.net (Curt Zirzow) Problem: Php will allocate a new pcre object for each different regular expression. Since the allocated memory is outside the zend memory system, php can eat up lots of memory, and potentially eventually exhausting the memory. The patch I wrote introduces a new flag 'z', which enables the user to opt out of php caching the regular expression. Patch: http://zirzow.dyndns.org/patches/preg/php_pcre.patch Examples: http://zirzow.dyndns.org/patches/preg/pcre_memory.phps http://zirzow.dyndns.org/patches/preg/pcre_fixed.phps Curt -- First, let me assure you that this is not one of those shady pyramid schemes you've been hearing about. No, sir. Our model is the trapezoid!