ANTICHAT

ANTICHAT (https://forum.antichat.xyz/index.php)
-   Общие вопросы программирования (https://forum.antichat.xyz/forumdisplay.php?f=206)
-   -   memory (active private working set) (https://forum.antichat.xyz/showthread.php?t=1539923)

Sam201 26.07.2025 05:42

Как узнать объем памяти (active private working set) для процесса gtasa.exe? Я пытался, но с помощью Python смог получить только значение working set. Кто-нибудь может помочь с этим?

СгенерироватьНикнейм 26.07.2025 06:08

Windows API:





Код:

def get_total_memory():
    memory_status = MEMORYSTATUSEX()
    memory_status.dwLength = ctypes.sizeof(MEMORYSTATUSEX)
    ctypes.windll.kernel32.GlobalMemoryStatusEx(ctypes.byref(memory_status))
 
    total_memory = memory_status.ullTotalPhys
    print(f"RAM: {total_memory / (1024**3):.2f} GB")
    print(f"RAM: {total_memory / (1024**2):.2f} MB")
    return total_memory



Время: 12:54