-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
-opendir/readdir aren't available on Win32, so use http://www.softagalleria.net/dirent.php , another alternative source of readdir would be Win32 Perl's readdir, but the perl interp would need to be removed from the code to use it, using this plain C solution is the easiest ATM CacheStat: -reuse the private (but it isnt private, since we have the src in dirent.h) stat-like info by peaking inside the opaque DIR *, avoid doing more kernel calls and filename ASCII to Unicode conversions -don't do strlen twice -use GetFileAttributesEx instead of _stat, MS CRT _stat uses FindFirstFile/FindClose which contains 3 syscalls to the kernel (open dir, query entry in dir, close) GetFileAttributesEx is more efficient since it doesn't create a kernel handle with NT Object Manager, and uses a kernel C stack alloced FILE_OBJECT instead of kernel malloc FILE_OBJECT -add WIN32_LEAN_AND_MEAN so a .i file is a couple hundred KB smaller this makes my IDE more responsive in greping a dmake .i file
- Loading branch information
Showing
20 changed files
with
889 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.