lkd> db /p 3ffef000
3ffef000 77 83 6a 61 f7 45 83 d8-8e 39 67 9f 3e 54 66 58 w.ja.E...9g.>TfX
3ffef010 f6 71 b6 6a 59 87 4e 19-52 29 92 41 ac 9f 8e 23 .q.jY.N.R).A...#
3ffef020 57 0f 83 43 b0 b0 ee 4a-5b a3 1d 5e 44 d7 b8 63 W..C...J[..^D..c
3ffef030 76 82 de 7b 63 aa 6d 61-a8 a2 15 8e 6b ec 02 57 v..{c.ma....k..W
3ffef040 ae 03 43 b0 67 5a 8e 59-02 49 5c e5 87 29 37 74 ..C.gZ.Y.I\..)7t
3ffef050 a2 5e ab 63 aa 6d 61 88-12 15 ae 7f 6a 91 b7 ae .^.c.ma.....j...
3ffef060 03 43 b0 b0 ee 4a 5b 32-0d 4e 25 d6 4c 45 45 53 .C...J[2.N%.LEES
3ffef070 6f da 63 aa 6d 41 e8 f2-15 8e bb 5c d3 d7 ce 77 o.c.mA.....\...w
Clearly there is memory that is addressable beyond 3FF7D000.
Would someone please comment on what the value returned in ullTotalPhys
member of the MEMORYSTATUSEX structure represents. Is this the total
physical memory that is *available* to the kernel? Is there a more accurate
way to determine the total physical memory?
Thanks,
George.
"George M. Garner Jr." <gmga...@erols.com> wrote in message
news:u4ScddUh...@TK2MSFTNGP09.phx.gbl...
Thanks for the reference to this URL (which is almost as long as the thread
that it references). :-)
The gist of this thread seems to be that ullTotalPhys represents the total
memory available to the kernel and does not include physical memory reserved
for certain devices, such as video cards. Perhaps there should be some
changes to the documentation to reflect this.
Thanks,
George.
After a little more research I have determined that this is the result of a
bug in GlobalMemoryStatusEx which determines the total physical memory using
an algorithm that fails to account for the presense of large pages. In
effect, GlobalMemoryStatusEx *calculates* the amount of physical memory by
multiplying the total number of physical pages by the default page size.
The problem is that the physical pages are not all the same size and by
erroneously assuming that they are GlobalMemoryStatusEx underestimates the
amount of physical memory present on a system. Since ullAvailPhys is
calculated in the same way it presumably is similarly erroneous, but that is
harder to verify.
NtQuerySystemInformation with an information class of SystemBasicInformation
provides the HighestPhysicalPage. The following formula yields the correct
result:
(HighestPhysicalPage + 1) x PhysicalPageSize
Regards,
George.
"George M. Garner Jr." <gmga...@erols.com> wrote in message
news:%23Q4u9qZ...@tk2msftngp13.phx.gbl...