@@ -184,11 +184,7 @@ ZEND_API void *_emalloc(size_t size ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC)
184
184
#endif
185
185
#if MEMORY_LIMIT
186
186
CHECK_MEMORY_LIMIT (size , SIZE );
187
- if (AG (allocated_memory ) > AG (allocated_memory_peak )) {
188
- AG (allocated_memory_peak ) = AG (allocated_memory );
189
- }
190
187
#endif
191
-
192
188
HANDLE_UNBLOCK_INTERRUPTIONS ();
193
189
return (void * )((char * )p + sizeof (zend_mem_header ) + MEM_HEADER_PADDING );
194
190
}
@@ -308,11 +304,7 @@ ZEND_API void *_erealloc(void *ptr, size_t size, int allow_failure ZEND_FILE_LIN
308
304
#endif
309
305
#if MEMORY_LIMIT
310
306
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
- }
314
307
#endif
315
-
316
308
p -> size = size ;
317
309
318
310
HANDLE_UNBLOCK_INTERRUPTIONS ();
@@ -397,7 +389,6 @@ ZEND_API void start_memory_manager(ALS_D)
397
389
AG (memory_limit ) = 1 <<30 ; /* rediculous limit, effectively no limit */
398
390
AG (allocated_memory ) = 0 ;
399
391
AG (memory_exhausted ) = 0 ;
400
- AG (allocated_memory_peak ) = 0 ;
401
392
#endif
402
393
403
394
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)
496
487
}
497
488
#if MEMORY_LIMIT
498
489
AG (memory_exhausted )= 0 ;
499
- AG (allocated_memory_peak ) = 0 ;
500
490
#endif
501
491
502
-
503
492
#if (ZEND_DEBUG )
504
493
do {
505
494
zval display_memory_cache_stats ;
0 commit comments