-
Notifications
You must be signed in to change notification settings - Fork 8k
Use EG(vm_stack_page_size). #3718
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
May be I misunderstood this without the context, but I think the patch is wrong.
|
|
Sorry, I was confused last night and I thought wrong for something, thank you for your prompt answer. <?php
$params = '';
for ($n = 0; $n < 256; $n++) {
$params .= "\$p{$n} = null;\n";
}
$gen = <<<PHP
<?php
go(function () {
{$params}
});
PHP;
file_put_contents(__DIR__ . '/extend.php', $gen);In coroutine |
|
you are right. This has to be fixed. I'll think, what to do. |
|
Please check if this patch works for you |
|
@dstogov Yes! This is what I want! Thanks! your ALIGNED macro is better for using. |
e5fe419 to
388c31e
Compare
|
😵, tab and space mixed in some places, maybe petk can slove these... it looks good now. |
|
I've merged the patch into master and PHP-7.3 |
|
👍OK, thank you very much! |
|
@dstogov |
|
I would add debug counters or logging into zend_vm_stack_extend(), then run few apps and made decision based on collected data. |
|
Thanks, I will have a try too. |
6780c74
@dstogov
I am confused when I read the source code, even if
zend_vm_stack_initdoes not provide parameters to set it, we can write our own init function, but whenzend_vm_stack_extendandsize > EG(vm_stack_page_size), it still use ZEND_VM_STACK_PAGE_SIZE (256k?), if it's a little big when page_size is 4k or 8k for a coroutine?emmm... and I do hope that you can provide more powerful APIs for coroutine...
Thanks!