Skip to content

Commit 8ef5510

Browse files
author
Andi Gutmans
committed
- Bad merge. Revert the previous patch (damn CVS).
1 parent 9794acb commit 8ef5510

File tree

1 file changed

+0
-11
lines changed

1 file changed

+0
-11
lines changed

Zend/zend_alloc.c

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -184,11 +184,7 @@ ZEND_API void *_emalloc(size_t size ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC)
184184
#endif
185185
#if MEMORY_LIMIT
186186
CHECK_MEMORY_LIMIT(size, SIZE);
187-
if (AG(allocated_memory) > AG(allocated_memory_peak)) {
188-
AG(allocated_memory_peak) = AG(allocated_memory);
189-
}
190187
#endif
191-
192188
HANDLE_UNBLOCK_INTERRUPTIONS();
193189
return (void *)((char *)p + sizeof(zend_mem_header) + MEM_HEADER_PADDING);
194190
}
@@ -308,11 +304,7 @@ ZEND_API void *_erealloc(void *ptr, size_t size, int allow_failure ZEND_FILE_LIN
308304
#endif
309305
#if MEMORY_LIMIT
310306
CHECK_MEMORY_LIMIT(size - p->size, SIZE - REAL_SIZE(p->size));
311-
if (AG(allocated_memory) > AG(allocated_memory_peak)) {
312-
AG(allocated_memory_peak) = AG(allocated_memory);
313-
}
314307
#endif
315-
316308
p->size = size;
317309

318310
HANDLE_UNBLOCK_INTERRUPTIONS();
@@ -397,7 +389,6 @@ ZEND_API void start_memory_manager(ALS_D)
397389
AG(memory_limit) = 1<<30; /* rediculous limit, effectively no limit */
398390
AG(allocated_memory) = 0;
399391
AG(memory_exhausted) = 0;
400-
AG(allocated_memory_peak) = 0;
401392
#endif
402393

403394
memset(AG(fast_cache_list_head), 0, sizeof(AG(fast_cache_list_head)));
@@ -496,10 +487,8 @@ ZEND_API void shutdown_memory_manager(int silent, int clean_cache)
496487
}
497488
#if MEMORY_LIMIT
498489
AG(memory_exhausted)=0;
499-
AG(allocated_memory_peak) = 0;
500490
#endif
501491

502-
503492
#if (ZEND_DEBUG)
504493
do {
505494
zval display_memory_cache_stats;

0 commit comments

Comments
 (0)