On Tue, Nov 18, 2014 at 7:49 AM, Xinchen Hui <larue...@gmail.com> wrote:
> > > Sent from my iPhone > > On Nov 18, 2014, at 12:34 PM, Dmitry Stogov <dmi...@zend.com> wrote: > > > > On Tue, Nov 18, 2014 at 6:01 AM, Xinchen Hui <xinche...@zend.com> wrote: > >> Hey: >> >> >> >> On Mon, Nov 17, 2014 at 5:25 PM, Dmitry Stogov <dmi...@zend.com> wrote: >> > Hi, >> > >> > Please review the patch >> https://gist.github.com/dstogov/47a39aff37f0a6441ea0 >> >> I am not sure, why can't we build a zend_string arg->name from char * >> while doing register internal functions? >> > > We can, but it'll take significant amount of additional memory and then we > will have to free it on shutdown. > > we only need do it in master process, and mark as interned(with hash > precalculated), no write will be happened, so thanks to COW on fork, we > won't need lots of extra memory. > It's not true for Windows. On Linux we would copy arg_info from shared read-only segment into process heap memory, then some blocks may be COW or not depended on luck. Thanks. Dmitry. > > Thanks > > > Thanks. Dmitry. > > >> >> then we can have the same zend_arg_info in runtime for both >> internal/user functions? >> >> thanks >> > >> > Thanks. Dmitry. >> >> >> >> -- >> Xinchen Hui >> @Laruence >> http://www.laruence.com/ >> > >