cvs: Zend(PHP_4_4) / zend_alloc.c php-src NEWS
| From: | Ilia Alshanetsky | Date: | Thu, 18 Aug 2005 15:14:48 +0000 |
| Subject: | cvs: Zend(PHP_4_4) / zend_alloc.c php-src NEWS | ||
| Groups: | php.zend-engine.cvs | ||
| Request: | Send a blank email to php-zend-engine-cvs+get-4043@lists.php.net to get a copy of this message | ||
iliaa Thu Aug 18 11:14:48 2005 EDT
Modified files: (Branch: PHP_4_4)
/php-src NEWS
/Zend zend_alloc.c
Log:
MFH: Fixed bug #34156 (memory usage remains elevated after memory limit is
reached)
http://cvs.php.net/diff.php/php-src/NEWS?r1=1.1247.2.920.2.27&r2=1.1247.2.920.2.28&ty=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.1247.2.920.2.27 php-src/NEWS:1.1247.2.920.2.28
--- php-src/NEWS:1.1247.2.920.2.27 Wed Aug 17 21:15:53 2005
+++ php-src/NEWS Thu Aug 18 11:14:46 2005
@@ -1,6 +1,8 @@
PHP 4 NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
?? ??? 2005, Version 4.4.1
+- Fixed bug #34156 (memory usage remains elevated after memory limit is
+ reached). (Ilia)
- Fixed bug #34148 (+,- and . not supported as parts of scheme). (Ilia)
- Fixed bug #34068 (Numeric string as array key not cast to integer in
wddx_deserialize()). (Ilia)
http://cvs.php.net/diff.php/Zend/zend_alloc.c?r1=1.105.4.9&r2=1.105.4.9.2.1&ty=u
Index: Zend/zend_alloc.c
diff -u Zend/zend_alloc.c:1.105.4.9 Zend/zend_alloc.c:1.105.4.9.2.1
--- Zend/zend_alloc.c:1.105.4.9 Thu Apr 7 16:54:33 2005
+++ Zend/zend_alloc.c Thu Aug 18 11:14:48 2005
@@ -67,7 +67,8 @@
#define _CHECK_MEMORY_LIMIT(s, rs, file, lineno) { AG(allocated_memory) += rs;\
if (AG(memory_limit)<AG(allocated_memory)) {\
int php_mem_limit = AG(memory_limit); \
- if (EG(in_execution) && AG(memory_limit)+1048576 > AG(allocated_memory) - rs) {
\
+ AG(allocated_memory) -= rs; \
+ if (EG(in_execution) && AG(memory_limit)+1048576 > AG(allocated_memory)) { \
AG(memory_limit) = AG(allocated_memory) + 1048576; \
if (file) { \
zend_error(E_ERROR,"Allowed memory size of %d bytes exhausted at %s:%d (tried to
allocate %d bytes)", php_mem_limit, file, lineno, s); \