Of course, it would be great to always use zend_string, but only arg_info
duplication (without char -> zend_string) would add ~90KB on 32-bit system
and ~150KB on 64-bit system per process. So I expect 300-500KB wasted per
process.

Actually, only inheritance and reflection code was complicated by the patch
(not significantly).

Thanks. Dmitry.



On Tue, Nov 18, 2014 at 8:47 AM, Stanislav Malyshev <smalys...@gmail.com>
wrote:

> Hi!
>
> >> 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.
>
> How bad would it be? Given that significantly simplifies the code, and
> does not require to check and write two branches each time we deal with
> arginfo, maybe it is worth to spend some memory (given that we only
> spend it once on init)?
>

Reply via email to