I am trying to use perfmon, and according to MSDN, the "System Code Total Bytes" counter ...
Shows the size, in bytes, of pageable operating system code currently in virtual memory. It is a measure of the amount of physical memory being used by the operating system that can be written to disk when not in use. This value is calculated by adding the bytes in Ntoskrnl.exe, Hal.dll, the boot drivers, and file systems loaded by Ntldr/osloader. This counter does not include code that must remain in physical memory and cannot be written to disk.
But isn't that a contradiction? It says it is the "size in virtual memory" and the very next sentence it says it's the "amount of physical memory being used". From my understanding, just because virtual memory exists does not mean there is any physical memory mapped to it because memory can be paged to the pagefile on disk when there isn't enough phsyical ram. so size of virtual memory and size of physical memory are distinctly different.
another thing which confuses me is that the "value is calculated by adding the bytes in Ntoskrnl.exe, Hal.dll, the boot drivers, and file systems loaded by Ntldr/osloader". So wouldn't that number be a constant irrespective of how much of those files are loaded into virtual/physical memory?
Can someone help me understand what this counter means?