RE: [PHP-DEV] Stream chunk size

From: Date: Fri, 06 Mar 2009 19:39:59 +0000
Subject: RE: [PHP-DEV] Stream chunk size
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-43270@lists.php.net to get a copy of this message
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

« previous php.internals (#43270) next »