Re: Patch for PHP 4.0.6 memory limit problem posted
| From: | Rouvas Stathis | Date: | Sun, 01 Jul 2001 16:48:07 +0000 |
| Subject: | Re: Patch for PHP 4.0.6 memory limit problem posted | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-55750@lists.php.net to get a copy of this message | ||
Patch cannot be successfully applied. Any suggestions ?
Output from patch application:
<start>
rouvas@aspasia(12) /opt/ide2/rouvas/tmp/php-4.0.6/Zend >patch -i
patch.zend_alloc.c
patching file zend_alloc.c
Hunk #1 FAILED at 446.
1 out of 1 hunk FAILED -- saving rejects to file zend_alloc.c.rej
rouvas@aspasia(13) /opt/ide2/rouvas/tmp/php-4.0.6/Zend >cat
zend_alloc.c.rej
***************
*** 446,451 ****
for (i=1; i<MAX_CACHED_MEMORY; i++) {
for (j=0; j<AG(cache_count)[i]; j++) {
ptr = (zend_mem_header *)
AG(cache)[i][j];
REMOVE_POINTER_FROM_LIST(ptr);
free(ptr);
}
--- 446,454 ----
for (i=1; i<MAX_CACHED_MEMORY; i++) {
for (j=0; j<AG(cache_count)[i]; j++) {
ptr = (zend_mem_header *)
AG(cache)[i][j];
+ #if MEMORY_LIMIT
+ AG(allocated_memory) -=
REAL_SIZE(ptr->size);
+ #endif
REMOVE_POINTER_FROM_LIST(ptr);
free(ptr);
}
</start>
-Stathis.
Andi Gutmans wrote:
>
> There is a bug in PHP 4.0.6 which affects PHP users who use the memory
> limit option. (i.e. developers who include --enable-memory-limit in their
> configure line).
> The patch is posted at http://www.php.net/downloads.php. If you
> don't use
> this option there is no need for you to download and apply the patch.
>
> Andi
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net