Fix address truncation on Windows
authorBruce Cran <bruce@cran.org.uk>
Wed, 4 Apr 2012 00:00:00 +0000 (18:00 -0600)
committerJens Axboe <axboe@kernel.dk>
Wed, 4 Apr 2012 00:00:00 +0000 (18:00 -0600)
Avoid having PAGE_ALIGN truncate addresses by using a pointer-sized
variable for the page size and mask.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
fio.c
fio.h

diff --git a/fio.c b/fio.c
index be60c5f..ac026fb 100644 (file)
--- a/fio.c
+++ b/fio.c
@@ -36,8 +36,8 @@
 #include "memalign.h"
 #include "server.h"
 
-unsigned long page_mask;
-unsigned long page_size;
+uintptr_t page_mask;
+uintptr_t page_size;
 
 static int endian_check(void)
 {
diff --git a/fio.h b/fio.h
index cf2e3c5..6da22f0 100644 (file)
--- a/fio.h
+++ b/fio.h
@@ -528,7 +528,7 @@ extern int groupid;
 extern int terse_output;
 extern int temp_stall_ts;
 extern unsigned long long mlock_size;
-extern unsigned long page_mask, page_size;
+extern uintptr_t page_mask, page_size;
 extern int read_only;
 extern int eta_print;
 extern unsigned long done_secs;