Re: [PHP-DEV] Segmented argument_stack

2008-01-23 Thread Nuno Lopes
As a side note, I think the following code could be optimized: Probably it could, but note that the code not just moves the stack pointer, but also destroys arguments there (zval_ptr_dtor). + while (zend_vm_stack_top(TSRMLS_C) != stack_frame) { + zval *stack_zval_p = zend_vm_stack_pop(TSRMLS

Re: [PHP-DEV] Segmented argument_stack

2008-01-23 Thread Dmitry Stogov
you'll show me a way to optimize it. Thanks. Dmitry. Thanks, Nuno - Original Message - From: "Dmitry Stogov" <[EMAIL PROTECTED]> To: "PHP Internals List" Sent: Monday, January 21, 2008 7:47 PM Subject: [PHP-DEV] Segmented argument_stack Hi, Th

Re: [PHP-DEV] Segmented argument_stack

2008-01-21 Thread Nuno Lopes
_vm_stack_pop_until(stack_frame)). That way the function call cleanup would be a little faster. Thanks, Nuno - Original Message - From: "Dmitry Stogov" <[EMAIL PROTECTED]> To: "PHP Internals List" Sent: Monday, January 21, 2008 7:47 PM Subject: [PHP-DEV] Segmen

[PHP-DEV] Segmented argument_stack

2008-01-21 Thread Dmitry Stogov
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 cop