Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:43270 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 92144 invoked from network); 6 Mar 2009 19:40:05 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 6 Mar 2009 19:40:05 -0000 Authentication-Results: pb1.pair.com header.from=jbondc@openmv.com; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=jbondc@openmv.com; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain openmv.com from 64.15.152.204 cause and error) X-PHP-List-Original-Sender: jbondc@openmv.com X-Host-Fingerprint: 64.15.152.204 mail.ca.gdesolutions.com Received: from [64.15.152.204] ([64.15.152.204:60155] helo=mail.ca.gdesolutions.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 3F/DD-42068-41C71B94 for ; Fri, 06 Mar 2009 14:40:05 -0500 Received: from localhost (localhost [127.0.0.1]) by mail.ca.gdesolutions.com (Postfix) with ESMTP id 90F1D5C51; Fri, 6 Mar 2009 14:40:01 -0500 (EST) X-Virus-Scanned: amavisd-new at gdesolutions.com Received: from mail.ca.gdesolutions.com ([127.0.0.1]) by localhost (mail.ca.gdesolutions.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id SE5sYMQTT8Xs; Fri, 6 Mar 2009 14:40:01 -0500 (EST) Received: from djbondc (modemcable158.97-203-24.mc.videotron.ca [24.203.97.158]) by mail.ca.gdesolutions.com (Postfix) with ESMTP id E22045C3D; Fri, 6 Mar 2009 14:40:00 -0500 (EST) To: "'Andi Gutmans'" Cc: "'PHP Developers Mailing List'" References: <002a01c99b56$97b7fd00$c727f700$@com> <698DE66518E7CA45812BD18E807866CE029F4805@us-ex1.zend.net> In-Reply-To: <698DE66518E7CA45812BD18E807866CE029F4805@us-ex1.zend.net> Date: Fri, 6 Mar 2009 14:39:59 -0500 Message-ID: <000601c99e93$56c67e80$04537b80$@com> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 12.0 Thread-Index: AcmbVpXRvcgBz3lWRwWZQb1SjgaG2wAXfqOAALNfJnA= Content-Language: en-ca Subject: RE: [PHP-DEV] Stream chunk size From: jbondc@openmv.com ("Jonathan Bond-Caron") On Mon Mar 2 11:10 PM, Andi Gutmans wrote: > I don't see a fundamental issue why it could not be arbitrary. > The only challenge which may be an issue is that this code clearly > allocates the buffer on the stack for what are probably performance > reasons. If you allow arbitrary chunk size and use alloca() > (do_alloca()) for stack allocation you might kill the stack. > > I suggest you do some performance tests and if you need to keep it on > the stack then create some arbitrary limit like 8K and use stack below > that and use heap above that (code will be uglier). > Thanks for the tips, it's on a todo list