1 Attachment(s)
memstat: memory status and large page blocks available
MEMSTAT prints memory status and tries to allocate all available memory using the largest possible blocks. It does it twice: first, using 4kb pages and again with 2/4 mb pages. This program is mainly useful to check whether you can run some software requiring large contiguous memory blocks, like 32-bit 7-zip or 7-zip in largepage (-slp) mode
Program transcript, including several runs of 64-bit version. Note that set of 4mb-paged memory blocks differs from run to run, and that program is rather slow (about 20 secs on my box):
Code:
C:\>t memstat32.exe
There is 17 percent of memory in use.
There are 16360 total Mbytes of physical memory.
There are 13447 free Mbytes of physical memory.
There are 16374 total Mbytes of paging file.
There are 12841 free Mbytes of paging file.
There are 4095 total Mbytes of virtual memory.
There are 4081 free Mbytes of virtual memory.
There are 0 free Mbytes of extended memory.
Memory allocation using VirtualAlloc with 4kb pages:
Allocated 2047 mb, addr=7FFF0000
Allocated 1857 mb, addr=00790000
Allocated 122 mb, addr=774F0000
Allocated 13 mb, addr=75B40000
Allocated 4 mb, addr=74E10000
Allocated 3 mb, addr=76BB0000
Allocated 3 mb, addr=75660000
Allocated 2 mb, addr=74AB0000
Allocated 1 mb, addr=00590000
Allocated 1 mb, addr=753D0000
Allocated 1 mb, addr=77040000
Allocated 1 mb, addr=75A00000
Total: 4063 mb
Memory allocation using VirtualAlloc with 2/4mb pages:
Allocated 2044 mb, addr=80000000
Allocated 1852 mb, addr=00A00000
Allocated 120 mb, addr=77600000
Allocated 12 mb, addr=75C00000
Total: 4028 mb
Elapsed time = 0.632 seconds
C:\>t memstat64.exe
There is 17 percent of memory in use.
There are 16360 total Mbytes of physical memory.
There are 13554 free Mbytes of physical memory.
There are 16374 total Mbytes of paging file.
There are 12932 free Mbytes of paging file.
There are 8388607 total Mbytes of virtual memory.
There are 8388597 free Mbytes of virtual memory.
There are 0 free Mbytes of extended memory.
Memory allocation using VirtualAlloc with 4kb pages:
Allocated 16383 mb, addr=0000000080000000
Allocated 8191 mb, addr=0000000480000000
Allocated 4091 mb, addr=0000000680000000
Allocated 507 mb, addr=0000000000820000
Allocated 30 mb, addr=0000000020420000
Allocated 15 mb, addr=0000000022320000
Allocated 9 mb, addr=0000000023320000
Allocated 1 mb, addr=0000000000410000
Total: 29233 mb
Memory allocation using VirtualAlloc with 2/4mb pages:
Allocated 8424 mb, addr=0000000080000000
Allocated 2280 mb, addr=000000028E800000
Allocated 540 mb, addr=0000000000C00000
Allocated 152 mb, addr=0000000022800000
Total: 11396 mb
Elapsed time = 17.393 seconds
C:\>t memstat64.exe
There is 17 percent of memory in use.
There are 16360 total Mbytes of physical memory.
There are 13543 free Mbytes of physical memory.
There are 16374 total Mbytes of paging file.
There are 12924 free Mbytes of paging file.
There are 8388607 total Mbytes of virtual memory.
There are 8388597 free Mbytes of virtual memory.
There are 0 free Mbytes of extended memory.
Memory allocation using VirtualAlloc with 4kb pages:
Allocated 16383 mb, addr=0000000080000000
Allocated 8191 mb, addr=0000000480000000
Allocated 4091 mb, addr=0000000680000000
Allocated 507 mb, addr=0000000000650000
Allocated 30 mb, addr=0000000020250000
Allocated 14 mb, addr=0000000022150000
Total: 29221 mb
Memory allocation using VirtualAlloc with 2/4mb pages:
Allocated 8424 mb, addr=0000000080000000
Allocated 2280 mb, addr=000000028E800000
Allocated 484 mb, addr=0000000000A00000
Allocated 108 mb, addr=000000001EE00000
Allocated 24 mb, addr=0000000025A00000
Allocated 4 mb, addr=0000000027200000
Allocated 4 mb, addr=0000000027600000
Total: 11328 mb
Elapsed time = 17.497 seconds
C:\>t memstat64.exe
There is 17 percent of memory in use.
There are 16360 total Mbytes of physical memory.
There are 13548 free Mbytes of physical memory.
There are 16374 total Mbytes of paging file.
There are 12948 free Mbytes of paging file.
There are 8388607 total Mbytes of virtual memory.
There are 8388597 free Mbytes of virtual memory.
There are 0 free Mbytes of extended memory.
Memory allocation using VirtualAlloc with 4kb pages:
Allocated 16383 mb, addr=0000000080000000
Allocated 8191 mb, addr=0000000480000000
Allocated 4091 mb, addr=0000000680000000
Allocated 507 mb, addr=0000000000670000
Allocated 59 mb, addr=0000000020270000
Allocated 10 mb, addr=0000000023E70000
Total: 29246 mb
Memory allocation using VirtualAlloc with 2/4mb pages:
Allocated 9704 mb, addr=0000000080000000
Allocated 1000 mb, addr=0000000000A00000
Allocated 236 mb, addr=000000003F200000
Total: 10940 mb
Elapsed time = 5.934 seconds
C:\>t memstat64a.exe
There is 17 percent of memory in use.
There are 16360 total Mbytes of physical memory.
There are 13521 free Mbytes of physical memory.
There are 16374 total Mbytes of paging file.
There are 12919 free Mbytes of paging file.
There are 8388607 total Mbytes of virtual memory.
There are 8388597 free Mbytes of virtual memory.
There are 0 free Mbytes of extended memory.
Memory allocation using VirtualAlloc with 4kb pages:
Allocated 16383 mb, addr=0000000080000000
Allocated 8187 mb, addr=0000000480000000
Allocated 4603 mb, addr=000000067FC00000
Allocated 31 mb, addr=00000000006D0000
Allocated 8 mb, addr=00000000026D0000
Allocated 1 mb, addr=0000000002F00000
Allocated 1 mb, addr=0000000003080000
Total: 29218 mb
Memory allocation using VirtualAlloc with 2/4mb pages:
Allocated 6452 mb, addr=0000000080000000
Allocated 1964 mb, addr=0000000213400000
Allocated 532 mb, addr=0000000000A00000
Allocated 240 mb, addr=0000000021E00000
Allocated 24 mb, addr=0000000030E00000
Allocated 4 mb, addr=0000000032600000
Allocated 4 mb, addr=0000000032A00000
Total: 9220 mb
Elapsed time = 420.470 seconds