Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:78932 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 34064 invoked from network); 18 Nov 2014 05:40:05 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 18 Nov 2014 05:40:05 -0000 Authentication-Results: pb1.pair.com header.from=dmitry@zend.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=dmitry@zend.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain zend.com designates 209.85.220.177 as permitted sender) X-PHP-List-Original-Sender: dmitry@zend.com X-Host-Fingerprint: 209.85.220.177 mail-vc0-f177.google.com Received: from [209.85.220.177] ([209.85.220.177:62235] helo=mail-vc0-f177.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 94/26-06780-1BBDA645 for ; Tue, 18 Nov 2014 00:40:03 -0500 Received: by mail-vc0-f177.google.com with SMTP id ij19so6722123vcb.22 for ; Mon, 17 Nov 2014 21:39:59 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=/gzbFzRIjWKps2sdz+6B5i8pGQd/6mAZrQCCCWXGWHA=; b=HXQDGBXByRXD63Z0nuzuGANkXxeVysOtET34n9oO0Jg65Ll9Vg0hjvvuWyJaPLwg6w KYI2G2e7zPVUjvalday0BKUPdqslVXDatWqbTXMjIHKXKP9EohlAqoeicBxVHvRlPoGu vXBdTIRw31ZTVewkHDpllcRQV0sGsCfyG+S4K1H65BYNXXY9tgOPejDuibTcAUJWez4N 8ERnrqImf39vVYvjVjhFss69wIHRa7BIUgKnLNh0NNkj5jW2laEmV5PINa9tQLmO8MMT ZkKtkGcbES+yngnl/pSmBUNUsTfg6ihtUwWVOvcFlqgmZpkyHfjea3l/rObiuxNoFpYk YvJg== X-Gm-Message-State: ALoCoQmi1oH8j/tqF1U4pIp1gwOCS+d6GUP7BfUPBpau5kn5MqPMlx0hO9aSqhyTMaTHyB95o9Um13YexO2276keofcMGVKingab9C2PzviLiOgHb+jU/4DjUv5Nw2hi3StRVSofqOWNPJOOXlMD2D6FOmLby86BJg== MIME-Version: 1.0 X-Received: by 10.52.82.73 with SMTP id g9mr25092263vdy.25.1416289199785; Mon, 17 Nov 2014 21:39:59 -0800 (PST) Received: by 10.52.176.231 with HTTP; Mon, 17 Nov 2014 21:39:59 -0800 (PST) In-Reply-To: References: Date: Tue, 18 Nov 2014 09:39:59 +0400 Message-ID: To: Xinchen Hui Cc: Xinchen Hui , Nikita Popov , Anatol Belski , PHP Internals Content-Type: multipart/alternative; boundary=001a11362598a72a2605081b86f1 Subject: Re: Use zend_string* for op_array->arg_info[].name and class_name From: dmitry@zend.com (Dmitry Stogov) --001a11362598a72a2605081b86f1 Content-Type: text/plain; charset=UTF-8 On Tue, Nov 18, 2014 at 7:49 AM, Xinchen Hui wrote: > > > Sent from my iPhone > > On Nov 18, 2014, at 12:34 PM, Dmitry Stogov wrote: > > > > On Tue, Nov 18, 2014 at 6:01 AM, Xinchen Hui wrote: > >> Hey: >> >> >> >> On Mon, Nov 17, 2014 at 5:25 PM, Dmitry Stogov 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/ >> > > --001a11362598a72a2605081b86f1--