Can you test the MemoryStatus() functions and compare the results with your system information?
It seems there's a discrepancy between the data obtained by #PB_System_TotalSwap and #PB_System_FreeSwap
and the data obtained by #PB_System_TotalVirtual and #PB_System_TotalVirtual
Furthermore, the results obtained with PB x64 regarding virtual memory are completely insane...
The results are the same with PB 6.12 and PB 6.20, x86 and x64
My results :
Sytem :
*******
CPUName(): 13th Gen Intel(R) Core(TM) i9-13900H
CountCPUs(#PB_System_CPUs): 20
CountCPUs(#PB_System_ProcessCPUs): 20
-----------------------------------------------------
WINDOWS 11 X64 system informations
-----------------------------------------------------
Mémoire physique (RAM) installée : 32.0 Go
Mémoire physique totale : 31.7 Go
Mémoire physique disponible : 23.4 Go
Mémoire virtuelle totale : 33.7 Go
Mémoire virtuelle disponible : 24.0 Go
Espace pour le fichier d'échange : 2.00 Go
-----------------------------------------------------
PB 621 B8 / WINDOWS 11 X86
-----------------------------------------------------
MemoryStatus(#PB_System_TotalPhysical) : 31.7 Go
MemoryStatus(#PB_System_FreePhysical) : 23.6 Go
MemoryStatus(#PB_System_PageSize) : 4.00 Ko
MemoryStatus(#PB_System_TotalSwap) (Windows & Linux) : 33.7 Go
MemoryStatus(#PB_System_FreeSwap) (Windows & Linux) : 23.6 Go
MemoryStatus(#PB_System_TotalVirtual) (Windows) : 4.00 Go
MemoryStatus(#PB_System_FreeVirtual) (Windows) : 3.90 Go
-----------------------------------------------------
PB 621 B8 / WINDOWS 11 X64
-----------------------------------------------------
MemoryStatus(#PB_System_TotalPhysical) : 31.7 Go
MemoryStatus(#PB_System_FreePhysical) : 23.6 Go
MemoryStatus(#PB_System_PageSize) : 4.00 Ko
MemoryStatus(#PB_System_TotalSwap) (Windows & Linux) : 33.7 Go
MemoryStatus(#PB_System_FreeSwap) (Windows & Linux) : 24.3 Go
MemoryStatus(#PB_System_TotalVirtual) (Windows) : 131072.0 Go
MemoryStatus(#PB_System_FreeVirtual) (Windows) : 131067.9 Go
Code: Select all
Procedure.s DisplaySize(Taille.q, Unite.l = -1, NbDecimals.l = 0)
; Taille = taille du lecteur
; Unite = unit of size, 0 = Byte, 1 = Kb, 2 = Mb, 3 = Gb. Si = -1, The choice of unit and number of decimals will be automatic
; NbDecimals = number of digits after the decimal point.
Protected Val.q, Txt.s
If Unite = -1
NbDecimals = 0 : Unite = 0
If Taille >= 1000 : Unite = 1 : NbDecimals = 2 : EndIf
If Taille >= 10000 : Unite = 1 : NbDecimals = 1 : EndIf
If Taille >= 1000000 : Unite = 2 : NbDecimals = 2 : EndIf
If Taille >= 10000000 : Unite = 2 : NbDecimals = 1 : EndIf
If Taille >= 1000000000 : Unite = 3 : NbDecimals = 2 : EndIf
If Taille >= 10000000000 : Unite = 3 : NbDecimals = 1 : EndIf
If Taille >= 10000000000000 : Unite = 4 : NbDecimals = 2 : EndIf
EndIf
Select Unite
Case 0 : Val = 1 : Txt = " Bytes"
Case 1 : Val = 1024 : Txt = " KB"
Case 2 : Val = 1024 * 1024 : Txt = " MB"
Case 3 : Val = 1024 * 1024 * 1024 : Txt = " GB"
Case 4 : Val = 1024 * 1024 * 1024 * 1024 : Txt = " TB"
EndSelect
ProcedureReturn StrF(Taille / Val, NbDecimals) + Txt
EndProcedure
Debug "Sytem :"
Debug "*******"
Debug "CPUName(): " + CPUName()
Debug "CountCPUs(#PB_System_CPUs): " + CountCPUs(#PB_System_CPUs)
Debug "CountCPUs(#PB_System_ProcessCPUs): " + CountCPUs(#PB_System_ProcessCPUs)
Debug "MemoryStatus(#PB_System_TotalPhysical): " + DisplaySize(MemoryStatus(#PB_System_TotalPhysical),-1)
Debug "MemoryStatus(#PB_System_FreePhysical): " + DisplaySize(MemoryStatus(#PB_System_FreePhysical),-1)
Debug "MemoryStatus(#PB_System_PageSize): " + DisplaySize(MemoryStatus(#PB_System_PageSize),-1)
Debug "MemoryStatus(#PB_System_TotalSwap) (Windows & Linux): " + DisplaySize(MemoryStatus(#PB_System_TotalSwap),-1)
Debug "MemoryStatus(#PB_System_FreeSwap) (Windows & Linux): " + DisplaySize(MemoryStatus(#PB_System_FreeSwap),-1)
Debug "MemoryStatus(#PB_System_TotalVirtual) (Windows): " + DisplaySize(MemoryStatus(#PB_System_TotalVirtual),-1)
Debug "MemoryStatus(#PB_System_FreeVirtual) (Windows): " + DisplaySize(MemoryStatus(#PB_System_FreeVirtual),-1)