Re: disktotalspace()

From: Date: Tue, 15 May 2001 04:01:04 +0000
Subject: Re: disktotalspace()
References: 1 2  Groups: php.dev 
Request: Send a blank email to php-dev+get-55290@lists.php.net to get a copy of this message
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

« previous php.dev (#55290) next »