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 ([EMAIL PROTECTED])  .  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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to