[NTOSKRNL] Round memory size up, "debug log" part

Assumed to better match actual physical RAM size.

CORE-12321
This commit is contained in:
Serge Gautherie 2018-02-03 00:19:18 +01:00 committed by Mark Jansen
parent 092c3710f2
commit 9ff9bd81c4
3 changed files with 11 additions and 6 deletions

View file

@ -1580,8 +1580,9 @@ Phase1InitializationDiscard(IN PVOID Context)
WINDOWS_NT_INFO_STRING,
&MsgEntry);
/* Get total RAM size */
Size = MmNumberOfPhysicalPages * PAGE_SIZE / 1024 / 1024;
/* Get total RAM size, in MiB */
/* Round size up. Assumed to better match actual physical RAM size */
Size = ALIGN_UP_BY(MmNumberOfPhysicalPages * PAGE_SIZE, 1024 * 1024) / (1024 * 1024);
/* Create the string */
StringBuffer = InitBuffer->VersionBuffer;