Segmented argument_stack

From: Date: Mon, 21 Jan 2008 19:47:38 +0000
Subject: Segmented argument_stack
Groups: php.internals 
Request: Send a blank email to internals+get-34855@lists.php.net to get a copy of this message
Hi, The attached patch (for PHP_5_3) implements the segmented argument_stack that has the following advantages: 1) It fixes #43426 and other crashes which occur because of stack reallocation. 2) The whole stack is never reallocated. So we don't have penalties because of the while stack copying (it may be 1MB and more). 3) CPU stack usage reduced, because execute_data, Ts and CVs now are stored in the same argument_stack. As result the probability of CPU stack overflow is reduced. 4) func_num_args(), func_get_agr(), func_get_args(), debug_print_backtrace() and exception's backtrace now always able to get arguments. They didn't work before in case of incomplete "arguments frame". For example: "foo(1, func_num_args());". 5) bench.php got about 1% speedup I'm going to commit the patch into HEAD and PHP_5_3 on Thursday. Any objections? Thanks. Dmitry.

« previous php.internals (#34855) next »