You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
doublecopyFile(size_tfileSize) // only called in very very rare cases
456
+
doublecopy_file(size_tfile_size) // only called in very very rare cases
457
457
{
458
458
doublett=wallclock();
459
-
mmp_copy=malloc(fileSize+1/* extra \0 */);
459
+
mmp_copy=malloc(file_size+1/* extra \0 */);
460
460
if (!mmp_copy)
461
461
return-1.0; // # nocov
462
-
memcpy(mmp_copy, mmp, fileSize);
462
+
memcpy(mmp_copy, mmp, file_size);
463
463
sof=mmp_copy;
464
-
eof= (char*)OFFSET_POINTER(mmp_copy, fileSize);
464
+
eof= (char*)OFFSET_POINTER(mmp_copy, file_size);
465
465
returnwallclock() -tt;
466
466
}
467
467
@@ -1603,7 +1603,7 @@ int freadMain(freadMainArgs _args)
1603
1603
if (verbose)
1604
1604
DTPRINT(_(" File ends abruptly with '%c'. Final end-of-line is missing. Copying file in RAM. %s.\n"), eof[-1], msg);
1605
1605
// In future, we may discover a way to mmap fileSize+1 on all OS when fileSize%4096==0, reliably. If and when, this clause can be updated with no code impact elsewhere.
1606
-
doubletime_taken=copyFile(fileSize);
1606
+
doubletime_taken=copy_file(fileSize);
1607
1607
if (time_taken==-1.0) {
1608
1608
// # nocov start
1609
1609
if (!verbose)
@@ -1892,7 +1892,7 @@ int freadMain(freadMainArgs _args)
1892
1892
if (verbose)
1893
1893
DTPRINT(_(" Copying file in RAM. %s\n"), msg);
1894
1894
ASSERT(mmp_copy==NULL, "mmp has already been copied due to abrupt non-eol ending, so it does not end with 2 or more eol.%s", ""/*dummy arg for macro*/); // #nocov
1895
-
doubletime_taken=copyFile(fileSize);
1895
+
doubletime_taken=copy_file(fileSize);
1896
1896
if (time_taken==-1.0) {
1897
1897
// # nocov start
1898
1898
if (!verbose)
@@ -1929,7 +1929,7 @@ int freadMain(freadMainArgs _args)
1929
1929
if (verbose) DTPRINT(_("[07] Detect column types, dec, good nrow estimate and whether first row is column names\n"));
1930
1930
if (verbose&&args.header!=NA_BOOL8) DTPRINT(_(" 'header' changed by user from 'auto' to %s\n"), args.header ? "true" : "false");
1931
1931
1932
-
type=malloc(sizeof(*type) *ncol);
1932
+
type=malloc(sizeof(*type) *ncol);
1933
1933
tmpType=malloc(sizeof(*tmpType) *ncol); // used i) in sampling to not stop on errors when bad jump point and ii) when accepting user overrides
0 commit comments