Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:86304 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 47855 invoked from network); 19 May 2015 15:02:41 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 19 May 2015 15:02:41 -0000 Authentication-Results: pb1.pair.com header.from=danack@basereality.com; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=danack@basereality.com; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain basereality.com from 209.85.213.48 cause and error) X-PHP-List-Original-Sender: danack@basereality.com X-Host-Fingerprint: 209.85.213.48 mail-yh0-f48.google.com Received: from [209.85.213.48] ([209.85.213.48:33001] helo=mail-yh0-f48.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id B6/49-13816-0905B555 for ; Tue, 19 May 2015 11:02:41 -0400 Received: by yhcb70 with SMTP id b70so4926638yhc.0 for ; Tue, 19 May 2015 08:02:37 -0700 (PDT) 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=1mmqe/fJxdhvkRHoJ7x7SL13WkgJxNbnMAoHqzdF7yI=; b=LGr5axP5wqGokiproh6Ge5F8kr6G4xx1HvhZmopwlCdynJT4UQ3jwZlMUdkpoM/bO2 aMnDmkXSge6sKEA4YdwOoU8VJcy/oAQVRHTkFGpXwyh5RFujZgLEbfKy7EisHXjBB4Wm N+nicaOY3ITo9XCUnek1Jiz3G7CF8yxxB2J+QvYHc9XUIOJYJaMr/kqRLHrofU+RbhgK qUkvxvxL/m6MzBo81yoGad14cpkorCoxsHCrY82xrdrF+nKrUNh3ZY56eDE5iWlocKcS KuVZIVM6uid9guugdcUC4REMNdMqhTNft8KD2Vj6XYs8DSv0nIw2Ujo5S+EUqrFey1uB twSA== X-Gm-Message-State: ALoCoQnyaS9kR1Ba3eisfTsLeM5UFUil3Hc/2OjOVToqS4/Hfb2DtQE4r+U4GLk0pOZu5AbJIZo/ MIME-Version: 1.0 X-Received: by 10.170.194.9 with SMTP id l9mr30457243yke.28.1432047757667; Tue, 19 May 2015 08:02:37 -0700 (PDT) Received: by 10.129.108.138 with HTTP; Tue, 19 May 2015 08:02:37 -0700 (PDT) X-Originating-IP: [89.242.229.174] In-Reply-To: <555B4889.7030808@gmail.com> References: <55567DD2.1090608@gmx.de> <555A70C1.9000409@gmx.de> <555A81FA.5080507@gmail.com> <555B4889.7030808@gmail.com> Date: Tue, 19 May 2015 15:02:37 +0000 Message-ID: To: Rowan Collins Cc: "internals@lists.php.net" Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] trigger GC before memory limit is exhausted From: danack@basereality.com (Dan Ackroyd) On 19 May 2015 at 14:28, Rowan Collins wrote: > Dan Ackroyd wrote on 19/05/2015 14:08: >> >> * When gc_collect_cycles is called (and potentially other functions), >> at the end of that function check whether the amount of memory being >> used is less than reset level for each trigger. If so reduce the >> current memory limit to the lowest trigger level. > > > The only flaw I see in this approach is that the majority of memory > deallocation is done transparently be the ref-counting mechanism, not any > particular function, and the user should be able to trigger this manually. Good point, I'll think about that. Danack wrote: > I'll wait for some feedback, then write an RFC Actually no I won't, I'll try to implement it as an extension first. cheers Dan