Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1074)

Unified Diff: base/file_util.h

Issue 2805064: Changing the pre-reading of chrome.dll to read it as an image section instead... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | base/file_util_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/file_util.h
===================================================================
--- base/file_util.h (revision 51300)
+++ base/file_util.h (working copy)
@@ -598,6 +598,15 @@
#endif // UNIT_TEST
+#if defined(OS_WIN)
+ // Loads the file passed in as an image section and touches pages to avoid
+ // subsequent hard page faults during LoadLibrary. The size to be pre read
+ // is passed in. If it is 0 then the whole file is paged in. The step size
+ // which indicates the number of bytes to skip after every page touched is
+ // also passed in.
+ bool PreReadImage(const wchar_t* file_path, size_t size_to_read,
+ size_t step_size);
+#endif // OS_WIN
} // namespace file_util
// Deprecated functions have been moved to this separate header file,
« no previous file with comments | « no previous file | base/file_util_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698