Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

MEMORY's pagefile numbers

May
12,957
172
Code:
22,639,194,112 bytes total page file
18,748,055,552 bytes available page file

What are those numbers and where do they come from? They do not correspond to anything I can find (or compute).
 
From system. You have configured a 20GB swap file plus an 1GB one was probably left around on C:\.
Check the

reg query "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" /v PagingFiles
reg query "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" /v ExistingPageFiles
 
From system. You have configured a 20GB swap file plus an 1GB one was probably left around on C:\.
Check the

reg query "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" /v PagingFiles
reg query "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" /v ExistingPageFiles
No. I have left it to the system on two drives.

Code:
v:\> reg query "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" /v PagingFiles

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management
    PagingFiles    REG_MULTI_SZ    c:\pagefile.sys 0 0\0d:\pagefile.sys 0 0


v:\> reg query "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" /v ExistingPageFiles

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management
    ExistingPageFiles    REG_MULTI_SZ    \??\C:\pagefile.sys\0\??\D:\pagefile.sys

And the current sizes are.

Code:
v:\> d d:\pa* c:\pa*
2024-01-16  11:51   3,087,007,744  pagefile.sys
2024-01-16  11:51   2,550,136,832  pagefile.sys
 
Am I looking at these?

Code:
ullTotalPageFile
The current committed memory limit for the system or the current process, whichever is smaller, in bytes.
Code:
ullAvailPageFile
The maximum amount of memory the current process can commit, in bytes. This value is equal to or smaller than the system-wide available commit value.

I have 16GB RAM, system-managed pagefiles (min = max = 0), and these pagefiles:

Code:
2024-01-16  11:51   3,087,007,744  pagefile.sys
2024-01-16  11:51   2,550,136,832  pagefile.sys

The second of these,

Code:
22,639,194,112 bytes total page file
17,135,960,064 bytes available page file

is pretty close to the first minus the sizes of my pagefiles. So what's the first ... some limit on how big the pagefiles can become? If so, have you got any guesses where it comes from?
 
I'm just guessing at Rex's implementation. How Windows internally produces those values I do not know.

Likewise the @WINMEMORY command, which supports the same values in the same order as MEMORY, and as in the MEMORYSTATUSEX structure.
 
Compare against some other tool. S.a. Cygwin's "free", which gives separate output for RAM and swap size.
Code:
$ reg query "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management"

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management
    PagingFiles    REG_MULTI_SZ    c:\dev\sdb1\pagefile.sys 8192 16384
    ExistingPageFiles    REG_MULTI_SZ    \??\C:\dev\sdb1\pagefile.sys

$ free
               total        used        free      shared  buff/cache   available
Mem:        16737676     5948528    10789148           0           0    10789148
Swap:        8388608      216616     8171992

$ tcc /C MEMORY

                 35 % Memory load

     17 139 380 224 bytes total physical RAM
     11 015 192 576 bytes available physical RAM

     25 729 314 816 bytes total page file
     17 051 353 088 bytes available page file

140 737 488 224 256 bytes total virtual RAM
138 533 912 702 976 bytes available virtual RAM

         29 028 352 bytes working set
         29 032 448 bytes peak working set
         16 900 096 bytes private usage

            262 144 characters total global alias
            261 643 characters free

            131 072 characters total global function
            131 071 characters free

             20 480 characters total global history

Page file set to 8..16 GB on second drive, and installed amount of RAM is 16GB.
So, "free" is correct.
TC's 'MEMORY' seems to sum it up and produce a grand total of 24GB RAM.

System's "total" memory status for reference

Code:
Module:                _Total
PID:                   0
Parent PID:            0
Priority:              0
Threads:               2186
Session:               0

Processor Time:          18 15:16:31.578     380%
Privileged Time:         18 13:20:01.062     260%
User Time:               01:56:30.515     120%
Handle Count:                 99437
Page File Bytes:         4863492096
Page File Bytes Peak:    8284557312
Working Set:             6323789824
Working Set Peak:        11600433152
Pool Nonpaged Bytes:        4652344
Pool Paged Bytes:          57550912
Private Bytes:           4863492096
Page Faults:              206188065  29076/sec
Virtual Bytes:           830665621312
Virtual Bytes Peak:      837398171456
 
Hmmm! Systeminfo.exe's (system32) virtual memory numbers match up pretty well with MEMORY's pagefile numbers.

Code:
v:\> systeminfo | grep Virt
Virtual Memory: Max Size:  21,590 MB
Virtual Memory: Available: 16,051 MB
Virtual Memory: In Use:    5,539 MB

v:\> memory | grep page
     22,639,194,112 bytes total page file
     16,820,273,152 bytes available page file

And then there's MEMORY's virtual RAM numbers ... (?)

Code:
140,737,488,224,256 bytes total virtual RAM
138,533,174,632,448 bytes available virtual RAM
 
Back
Top