Re: [PATCH] fix pcre global variable abuse
| From: | Andrei Zmievski | Date: | Fri, 23 Apr 2004 17:12:11 +0000 |
| Subject: | Re: [PATCH] fix pcre global variable abuse | ||
| References: | 1 2 3 4 5 6 7 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-9517@lists.php.net to get a copy of this message | ||
On Fri, 23 Apr 2004, Andi Gutmans wrote:
> Never mind. I don't feel like explaining myself a thousand times :) If
> you'd have read what I wrote you would have seen that I wasn't saying that
> we're using emalloc/efree (and thus the memory manager) today.
> I was talking about the PCRE library and not the PCRE extension. But in any
> case, as PCRE is caching compiled regexes in between requests I don't think
> we can make the library use emalloc/efree.
> Thus, it seems that the only option is to set the callbacks to malloc/free.
Or omit them at all. They are set to malloc/free by default anyway.
These callbacks are used only when PCRE library needs additional memory
during a long/large computation.
The regex cache is implemented via direct calls to pemalloc()/pefree(),
without using those callbacks.
- Andrei