File tree 1 file changed +5
-3
lines changed 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change 29
29
#endif
30
30
#endif
31
31
32
+ #define WAL_FILE_SIZE (16 * 1024 * 1024)
33
+
32
34
void die (char * str );
33
35
void print_elapse (struct timeval start_t , struct timeval elapse_t );
34
36
@@ -40,7 +42,7 @@ main(int argc, char *argv[])
40
42
int tmpfile ,
41
43
i ,
42
44
loops = 1000 ;
43
- char * strout = (char * ) malloc (65536 );
45
+ char * strout = (char * ) malloc (WAL_FILE_SIZE );
44
46
char * filename = FSYNC_FILENAME ;
45
47
46
48
if (argc > 2 && strcmp (argv [1 ],"-f" ) == 0 )
@@ -53,12 +55,12 @@ main(int argc, char *argv[])
53
55
if (argc > 1 )
54
56
loops = atoi (argv [1 ]);
55
57
56
- for (i = 0 ; i < 65536 ; i ++ )
58
+ for (i = 0 ; i < WAL_FILE_SIZE ; i ++ )
57
59
strout [i ] = 'a' ;
58
60
59
61
if ((tmpfile = open (FSYNC_FILENAME , O_RDWR | O_CREAT , S_IRUSR | S_IWUSR )) == -1 )
60
62
die ("can't open /var/tmp/test_fsync.out" );
61
- write (tmpfile , strout , 65536 );
63
+ write (tmpfile , strout , WAL_FILE_SIZE );
62
64
fsync (tmpfile ); /* fsync so later fsync's don't have to do
63
65
* it */
64
66
close (tmpfile );
You can’t perform that action at this time.
0 commit comments