diff options
author | Gabe Black <gblack@eecs.umich.edu> | 2010-08-13 06:16:30 -0700 |
---|---|---|
committer | Gabe Black <gblack@eecs.umich.edu> | 2010-08-13 06:16:30 -0700 |
commit | 961aafc044b934ac0e5d1ffe51fc5f33813b052b (patch) | |
tree | f03913ff8fd0d917b033935fcfb5d5c72de01f2b /util/m5/m5.c | |
parent | aa8c6e9c959eab4d516bc07593bea20ade9ad80c (diff) | |
parent | 73d9a51835f7f9b725b4bec851dac9d6482438e7 (diff) | |
download | gem5-961aafc044b934ac0e5d1ffe51fc5f33813b052b.tar.xz |
Merge with head.
Diffstat (limited to 'util/m5/m5.c')
-rw-r--r-- | util/m5/m5.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/util/m5/m5.c b/util/m5/m5.c index 7747fc0bc..96150f2bb 100644 --- a/util/m5/m5.c +++ b/util/m5/m5.c @@ -65,6 +65,11 @@ read_file(int dest_fid) int offset = 0; int len; + // Touch all buffer pages to ensure they are mapped in the + // page table. This is required in the case of X86_FS, where + // Linux does demand paging. + memset(buf, 0, sizeof(buf)); + while ((len = m5_readfile(buf, sizeof(buf), offset)) > 0) { write(dest_fid, buf, len); offset += len; |