Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:33627 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 82286 invoked by uid 1010); 4 Dec 2007 06:30:22 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 82271 invoked from network); 4 Dec 2007 06:30:22 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 4 Dec 2007 06:30:22 -0000 Authentication-Results: pb1.pair.com smtp.mail=andi@zend.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=andi@zend.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain zend.com designates 212.25.124.162 as permitted sender) X-PHP-List-Original-Sender: andi@zend.com X-Host-Fingerprint: 212.25.124.162 mail.zend.com Windows 2000 SP4, XP SP1 Received: from [212.25.124.162] ([212.25.124.162:5383] helo=mx1.zend.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id A3/70-52978-CF3F4574 for ; Tue, 04 Dec 2007 01:30:22 -0500 Received: from us-ex1.zend.com ([192.168.16.5]) by mx1.zend.com with Microsoft SMTPSVC(6.0.3790.3959); Tue, 4 Dec 2007 08:30:17 +0200 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: quoted-printable X-MimeOLE: Produced By Microsoft Exchange V6.5 Date: Mon, 3 Dec 2007 22:30:12 -0800 Message-ID: <698DE66518E7CA45812BD18E807866CEF890C7@us-ex1.zend.net> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [PHP-DEV] Garbage collector patch Thread-Index: Acg2O8/Utz2ifQocRIyMPAfOHmcwMwAAwNxw References: <698DE66518E7CA45812BD18E807866CEF88FDD@us-ex1.zend.net> To: "Ronald Chmara" Cc: X-OriginalArrivalTime: 04 Dec 2007 06:30:17.0017 (UTC) FILETIME=[2286FA90:01C8363F] Subject: RE: [PHP-DEV] Garbage collector patch From: andi@zend.com ("Andi Gutmans") > -----Original Message----- > From: Ronald Chmara [mailto:ron@Opus1.COM] > Sent: Monday, December 03, 2007 10:06 PM > To: Andi Gutmans > Cc: internals@lists.php.net > Subject: Re: [PHP-DEV] Garbage collector patch > I'm really hesitant to even *mention* this idea, but.... >=20 > Could "alternate" memory management systems be made available via > PECL add-ons, or, more to the point: > What is the *actual cost and complexity* involved in implementing > (possibly many) different user-selectable memory management systems, > and what other future benefits/drawbacks might we see by doing such a > thing? (GC is big now, but what about memory pools per mod_auth user, > or SHM/SEM pools, or tuning amounts of memory per function, etc...) >=20 > I will now apologize to everybody who I just made cry, scream, or > damage their furniture, as I didn't mean to hurt you, just trying to > stimulate ideas. Hi Ronald, PHP 5.2.x already supports the ability to hook in different "page" managers. In PHP 5.3 you can also override the memory allocation functions. However, this would not include garbage collection like algorithms which actually require changes in the core PHP data type such as zvals. In fact the garbage collection adds memory to the basic datatypes which is why I suggested to either always make these changes, or don't make them so that we retain binary compatibility across all builds of PHP. So overriding basic memory allocation functions, yes, ability to provide various GC implementations, no. Andi