Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:32059 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 61592 invoked by uid 1010); 5 Sep 2007 02:19:10 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 61577 invoked from network); 5 Sep 2007 02:19:10 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 5 Sep 2007 02:19:10 -0000 Authentication-Results: pb1.pair.com header.from=planetbeing@gmail.com; sender-id=pass; domainkeys=bad Authentication-Results: pb1.pair.com smtp.mail=planetbeing@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 64.233.182.185 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: planetbeing@gmail.com X-Host-Fingerprint: 64.233.182.185 nf-out-0910.google.com Received: from [64.233.182.185] ([64.233.182.185:14184] helo=nf-out-0910.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id AA/9C-14196-D121ED64 for ; Tue, 04 Sep 2007 22:19:10 -0400 Received: by nf-out-0910.google.com with SMTP id b21so1658977nfd for ; Tue, 04 Sep 2007 19:19:06 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=WjwY/fuQZheyajFDwWRIs6wcQGKzokujLNS6vnK6yncJGtaUjf+gVkJgHNZuwwVP7wOoka0W0I3GlJ4x6ZaiY4msS/4Hg6oTHBWC9su9QSTNhcg1TvbnkheilLORP1iyz+g105uuot2A0AlwBfvt1BKufOuTo71RLE/QwW+kLto= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=ha5LL4Oau3ra3RDyuM4LW7KqTd17lkgdq1QUzIx4WEagTfswJtAmvKghhlriyHRRvxQG5lynvzXXCIBAFgd0+y5QpiScbgizb2cCOZhT+RafAfSI79aGK49jEESPzEqgAP4UQeu0bIHJTYZmJR4xiv7dQaA3qE6/X2MljRY3G2U= Received: by 10.78.37.7 with SMTP id k7mr4711123huk.1188958746062; Tue, 04 Sep 2007 19:19:06 -0700 (PDT) Received: by 10.78.135.16 with HTTP; Tue, 4 Sep 2007 19:19:05 -0700 (PDT) Message-ID: Date: Wed, 5 Sep 2007 10:19:05 +0800 To: "Marcus Boerger" Cc: "Nuno Lopes" , internals@lists.php.net, andi@php.net, dmitry@php.net In-Reply-To: <849426349.20070904210047@marcus-boerger.de> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20070904162613.4qgfdddo7scw8o8w@w13.mail.sapo.pt> <849426349.20070904210047@marcus-boerger.de> Subject: Re: [PHP-DEV] Patch for macros for tracking refcount and is_ref From: planetbeing@gmail.com ("David Wang") On 9/5/07, Marcus Boerger wrote: > What is the problem with those objects? Basically there are at least three > seperated memory areas involved. First the zend_object container, the real > object and one or several zvals. The gc would simply have to decrease > refcount on zend_objects if their zval gets down to zero and then leave > zend_object gc'ing to the object storage. Hmm, maybe we have a misunderstanding here because I don't quite understand what you mean. :) In that paragraph, I was saying how implementing a traditional tracing garbage collector would mean refcounts are no longer necessary. These macros track refcounts, so they would also be no longer necessary. > Question for development, how do we ensure that starting from a specific > point in time we enforce usage of those macros? The one thing that comes > into my mind is that we could have the members [is_ref,refcount] prefixed > with something different when running in debug mode, or insert some random > prefix there....(?) In my own code, I have a "__gc" on refcount and is_ref so I get thrown an error if there's a place I failed to macroize. I removed that for this patch, but that's a very good point. If there are no objections, that or another prefix or suffix can be put back into the patch. David