> This isn't a Freenet problem really, it's a problem with the Windows file
system.  Freenet 0.4 stores all data in a single file, but Windows can't
make > a file larger then 2 GB (2048 MB).  Note that this is the limit of a
32-bit signed integer.  If Microsoft were to increase this to 64-bits, the
limit would > soar up to a few terrabytes.

Are you sure?   How can you explain the following API which has been in
existence since the first NT 4.0 and Windows 98?

GetFileAttributesEx
The GetFileAttributesEx function retrieves attributes for a specified file
or directory.
BOOL GetFileAttributesEx(
  LPCTSTR lpFileName,                   // file or directory name
  GET_FILEEX_INFO_LEVELS fInfoLevelId,  // attribute class
  LPVOID lpFileInformation              // attribute information
);

and the structure of the attribute information is a
WIN32_FILE_ATTRIBUTE_DATA structure, i.e.:

typedef struct _WIN32_FILE_ATTRIBUTE_DATA{
    DWORD      dwFileAttributes;
    FILETIME   ftCreationTime;
    FILETIME   ftLastAccessTime;
    FILETIME   ftLastWriteTime;
    DWORD      nFileSizeHigh;
    DWORD      nFileSizeLow;
} WIN32_FILE_ATTRIBUTE_DATA, *LPWIN32_FILE_ATTRIBUTE_DATA;

64 bits of file size information in nFileSizeHigh and nFileSizeLow -
suggests windows can create files > 4 gig.   Furthermore, as the docs for
the FindFirstFile API shows, 64 bit file sizes might even be supported even
on Windows 95 and NT 3.51  -  that API returns a WIN32_FIND_DATA structure
and that structure also contains DWORD nFileSizeHigh and nFileSizeLow.  An
umpteen-gigabyte file should easily be possible under Windows.   In fact I
remember reading a problem associated with Windows NT 4 in that file I/O may
take place at the wrong file location for files > 4Gig.  Why would they say
that if it could only create files of 2Gigs?   And the incorrect-file-io bug
was fixed in SP6a  which isn't particularly 'new'.


Dave


_______________________________________________
Devl mailing list
[EMAIL PROTECTED]
http://lists.freenetproject.org/mailman/listinfo/devl

Reply via email to