From db22b925bf3b9f2d097fa6b2a54dc595396cc5f5 Mon Sep 17 00:00:00 2001 From: Michael Wallner Date: Mon, 29 Jan 2007 13:04:57 +0000 Subject: [PATCH] - don't do memory limit checks for chunk_size --- main/output.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/main/output.c b/main/output.c index 2c9447e569..538e879961 100644 --- a/main/output.c +++ b/main/output.c @@ -887,20 +887,11 @@ static inline void php_output_context_dtor(php_output_context *context) static inline php_output_handler *php_output_handler_init_ex(zval *name, size_t chunk_size, int flags TSRMLS_DC) { php_output_handler *handler; - size_t mem_limit; handler = ecalloc(1, sizeof(php_output_handler)); ZVAL_ADDREF(name); handler->name = name; - - mem_limit = (PG(memory_limit) - zend_memory_usage(1 TSRMLS_CC)) / 2; - if (!chunk_size || chunk_size > mem_limit) { - handler->size = mem_limit; - chunk_size = 0; - } else { - handler->size = chunk_size; - } - + handler->size = chunk_size; handler->flags = flags; handler->buffer.size = PHP_OUTPUT_HANDLER_INITBUF_SIZE(chunk_size); handler->buffer.data = emalloc(handler->buffer.size); -- 2.50.1