From: Michael Wallner Date: Mon, 29 Jan 2007 13:04:57 +0000 (+0000) Subject: - don't do memory limit checks for chunk_size X-Git-Tag: RELEASE_1_0_0RC1~74 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=db22b925bf3b9f2d097fa6b2a54dc595396cc5f5;p=php - don't do memory limit checks for chunk_size --- 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);