summaryrefslogtreecommitdiff
path: root/Zend/zend_alloc.c
diff options
context:
space:
mode:
authorAndi Gutmans <andi@php.net>2004-07-10 07:46:17 +0000
committerAndi Gutmans <andi@php.net>2004-07-10 07:46:17 +0000
commite5cfb1d05cf10fa694f231dae33ccb03ab8f74c8 (patch)
tree65252174d1cad948046778306ce3ba09d3d78682 /Zend/zend_alloc.c
parent41b639fffebd099699cdf9c3231539d72602ce38 (diff)
downloadphp-git-e5cfb1d05cf10fa694f231dae33ccb03ab8f74c8.tar.gz
- Better stability during premature shutdown of request startup
Diffstat (limited to 'Zend/zend_alloc.c')
-rw-r--r--Zend/zend_alloc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Zend/zend_alloc.c b/Zend/zend_alloc.c
index 0fabed4dd2..ff80a702b1 100644
--- a/Zend/zend_alloc.c
+++ b/Zend/zend_alloc.c
@@ -75,7 +75,7 @@ static long mem_block_end_magic = MEM_BLOCK_END_MAGIC;
#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 (AG(memory_limit)+1048576 > AG(allocated_memory) - rs) { \
+ if (EG(in_execution) && AG(memory_limit)+1048576 > AG(allocated_memory) - rs) { \
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); \