On Wed, 2003-06-18 at 09:21, Stanislav Malyshev wrote:
> SS>> Common referred to real applications, not 'make test'.
>
> Do you have some data about real applications in PHP that use strings
> longer than 80 bytes via smart strings? My tests show most of the strings
> used are small. Looking at the clients of this functions and taking into
> account that prontf's are usually small and long printf are usually or
> rewritten into heredocs (which don't use smart strings) or separated into
> different functions.
> BTW, why do you think "make test" is a bad test of memory allocation
> patterns? What do you propose as a better test?
>
Yep. cURL uses smart_str pretty extensively for reading data from the
client. I have it alloc things in 4k chunks.
-Sterling
PS: I agree with your general pattern too. But I don't see where
sascha's approach is limiting. I'll try reading again after coffee. :)
--
"The three most dangerous things in the world are a programmer
with a soldering iron, a hardware type with a program patch and
a user with an idea."
- Unknown
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php