RE: [PHP-DEV] disktotalspace()
| From: | James Moore | Date: | Tue, 15 May 2001 17:24:25 +0000 |
| Subject: | RE: [PHP-DEV] disktotalspace() | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-55354@lists.php.net to get a copy of this message | ||
Before you add it can you name it properly (To the CVS standard).
cheers,
- James
> -----Original Message-----
> From: Jon Parise [mailto:jon@csh.rit.edu]
> Sent: 15 May 2001 05:01
> To: Sterling Hughes
> Cc: php-dev@lists.php.net
> Subject: Re: [PHP-DEV] disktotalspace()
>
>
> On Mon, May 14, 2001 at 11:51:52PM -0400, Sterling Hughes wrote:
>
> > The patch looks ok, a couple of questions though...
>
> I'm not the original author of the function, but so I'll answer
> as best I can.
>
> > 1) disktotalspace() looks like a memory intensive operation, perhaps
> > having a cache might not be a bad idea.
>
> Perhaps. I haven't profiled the function's use, but I can think
> of possible situations where it may be called multiple times in a
> script's execution.
>
> > 2) I see you use LoadLibrary to load in kernel32.dll on Win32, what
> > happens on that system when I call disk total space more than once?
> > Could this cause a crash?? Also, perhaps you don't need to load the
> > library in more than once, does anyone know of any other areas where
> > this library is loaded in?
>
> I know very little about Windows program, although I understand
> the points you raise. All I can say is that the Windows-specific
> portions of the disktotalspace() function were adapted from the
> preexisting diskfreespace() function. The original author of
> that code would be the best person to ask, I think.
>
> > 3) Why not just have a statfs() function instead, that would
> return all
> > this info and more?
>
> Again, the new function is based on diskfreespace(), so I think
> we just assumed the was a reason it was done that way. I presume
> that compatibility was the primary concern, but I can't say for
> sure.
>
> --
> Jon Parise (jon@csh.rit.edu) . Rochester Inst. of Technology
> http://www.csh.rit.edu/~jon/ : Computer Science House Member
>
> --
> PHP Development Mailing List <http://www.php.net/>
> To unsubscribe, e-mail: php-dev-unsubscribe@lists.php.net
> For additional commands, e-mail: php-dev-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net