Simple, allocate an arbitrary large number, like a gig, give there OS's paging
routines a test : )
That is a true point, I was thinking that in most cases you could accurately predict
the size.
g_strdup_printf - that sounds like a fun function, why don't most libraries have this
feature : )
-Jason
----- Original Message -----
From: "Andrei Zmievski" <[EMAIL PROTECTED]>
To: "Jason Greene" <[EMAIL PROTECTED]>
Cc: "Zeev Suraski" <[EMAIL PROTECTED]>; "php-dev mailinglist" <[EMAIL PROTECTED]>
Sent: Monday, March 12, 2001 10:15 AM
Subject: Re: [PHP-DEV] Re: [ZEND-ENGINE] cvs: Zend / zend_API.c zend_API.h
> On Mon, 12 Mar 2001, Jason Greene wrote:
> > strlcpy, and strlcat are in the win32 build (main/strlcat.c main/strlcpy.c)
> > why dont you malloc a buffer that would fit the sprintf data, and then strlcpy
> > the size restriction?
>
> Hmm, and how would you know how big the sprintf buffer would need to be
> for an arbitrary format and arguments? :) In my case it's much simpler,
> so yes, I could do that, but otherwise.. That's why Glib has
> g_strdup_printf() function.. quite nice.
>
> -Andrei
> * If it ain't broken, it doesn't have enough features yet. *
>
> --
> PHP Development Mailing List <http://www.php.net/>
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
--
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]