Page 1 of 1

memorystatus() explanation please in swap section

Posted: Wed Feb 27, 2013 1:52 pm
by sartic
; #PB_System_TotalSwap : the total Swap memory size, in bytes (Windows And Linux only)
; #PB_System_FreeSwap : the available Swap memory size, in bytes (Windows And Linux only)
; #PB_System_PageSize : the memory page size, in bytes (usually 4KB).

Totalswap is not size of pagefile.sys?!
Trying to read used size of swap in win7

Re: memorystatus() explanation please in swap section

Posted: Wed Feb 27, 2013 5:04 pm
by IdeasVacuum
Not sure about Swap Space, but #PB_System_TotalPhysical does not return the Total Physical RAM, it returns the MAX RAM available to apps (The system has it's own allocation of RAM taken from the total physical RAM).

Re: memorystatus() explanation please in swap section

Posted: Wed Feb 27, 2013 5:39 pm
by sartic
; #PB_System_TotalPhysical: the total amount of installed memory, in bytes
; #PB_System_FreePhysical : the available memory, in bytes
; #PB_System_TotalVirtual : the total virtual memory size, in bytes (Windows only)
; #PB_System_FreeVirtual : the available virtual memory size, in bytes (Windows only)
; #PB_System_TotalSwap : the total Swap memory size, in bytes (Windows And Linux only)
; #PB_System_FreeSwap : the available Swap memory size, in bytes (Windows And Linux only)
; #PB_System_PageSize : the memory page size, in bytes (usually 4KB).

it is RAM usable (example under 32bit of Windows i have 2,75GB of 4GB).
one 32bit program can not handle more than 2GB (i read somewhere that on Vista/7 it can handle 3GB)
virtual memory i can not comprehend but swap is something wrongly named i guess :)

Re: memorystatus() explanation please in swap section

Posted: Thu Feb 28, 2013 10:20 pm
by Thorium
If totalphysical and totalswap do not return the total physical ram and size of swapfile there is something wrong. They should be returned and can be retrieved with API with the same names on windows.
The memory your app can use is the virtual memory.
sartic wrote: virtual memory i can not comprehend
Virtual memory is the virtual address space of your process. Every process has it's own address space. Inside that address space the OS mapps physical memory, swap memory, files, etc.
It's also what limits your process to 2GB on 32bit. Thats the total size of the virtual memory address space. Can be tuned to 3GB, also on XP.