Author: tkreuzer
Date: Tue Mar 23 18:09:17 2010
New Revision: 46360
URL:
http://svn.reactos.org/svn/reactos?rev=46360&view=rev
Log:
[XDK]
Improve BYTES_TO_PAGES macro
Modified:
branches/header-work/include/xdk/mmfuncs.h
Modified: branches/header-work/include/xdk/mmfuncs.h
URL:
http://svn.reactos.org/svn/reactos/branches/header-work/include/xdk/mmfuncs…
==============================================================================
--- branches/header-work/include/xdk/mmfuncs.h [iso-8859-1] (original)
+++ branches/header-work/include/xdk/mmfuncs.h [iso-8859-1] Tue Mar 23 18:09:17 2010
@@ -55,7 +55,7 @@
* IN ULONG Size)
*/
#define BYTES_TO_PAGES(Size) \
- (((Size) >> PAGE_SHIFT) + (((Size) & (PAGE_SIZE - 1)) != 0))
+ (((Size) + PAGE_SIZE - 1) >> PAGE_SHIFT)
/* PVOID
* PAGE_ALIGN(