Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:100060 Return-Path: <0@lvht.net> Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 76515 invoked from network); 27 Jul 2017 13:01:05 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 27 Jul 2017 13:01:05 -0000 Authentication-Results: pb1.pair.com smtp.mail=0@lvht.net; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=0@lvht.net; sender-id=unknown Received-SPF: error (pb1.pair.com: domain lvht.net from 103.7.28.233 cause and error) X-PHP-List-Original-Sender: 0@lvht.net X-Host-Fingerprint: 103.7.28.233 smtpbg65.qq.com Linux 2.5 (sometimes 2.4) (4) Received: from [103.7.28.233] ([103.7.28.233:45236] helo=smtpbg65.qq.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 48/00-10671-D04E9795 for ; Thu, 27 Jul 2017 09:01:03 -0400 X-QQ-mid: bizesmtp4t1501160454tndv6ph2e Received: from [192.168.1.5] (unknown [218.81.133.196]) by esmtp4.qq.com (ESMTP) with id ; Thu, 27 Jul 2017 21:00:53 +0800 (CST) X-QQ-SSF: 01300000004000F0F320B00A0000000 X-QQ-FEAT: R3tZgSt770Mmy5DmNvaWiTWjSFDFkVyVo6hRdQjx2XqrdTYB3XfdiBHybEh6S uu66VGOjk4JDeOU+0wxzzPkFGtg4mf1/PpBzdft1aQds24RJlRVAt3wO59XWvT0GhMwTYUi XwkT4Lz+e4C82UT+wD95cNlYw4AxjsqX3rLF84se5KgF72k2ZUQ+kEIqmvMgqxxEdmmSExQ n69alD7RjF2jynA28bGxnvzyu6a42BXfikdEXaf/4Y3EGO01KzMYp0QRiflynoiEubyzkfA CUVw== X-QQ-GoodBg: 0 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) In-Reply-To: Date: Thu, 27 Jul 2017 21:00:52 +0800 Cc: "internals@lists.php.net" Content-Transfer-Encoding: 7bit Message-ID: <03CA73FF-AE61-41BD-B6C2-5A895566E7CA@lvht.net> References: To: Nicolas Grekas X-Mailer: Apple Mail (2.3273) X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtp:lvht.net:qybgforeign:qybgforeign4 X-QQ-Bgrelay: 1 Subject: Re: [PHP-DEV] Don't add simple objects to GC's roots From: 0@lvht.net (=?utf-8?B?5ZCV5rW35rab?=) Hi, > On 26 Jul 2017, at 22:57, Nicolas Grekas wrote: > > There is a way to work around: just call gc_disable(). But this means > dealing with side effects of the engine in userland. Moreover, this also > means leaking memory, since meanwhile roots are not populated. Maybe we could make gc_disable accept one reference zval as parameter, and clear the GC_COLLECTABLE flag of zval.value->gc.u.v.flags. So, this zval will never be put into gc root list.