File tree Expand file tree Collapse file tree 1 file changed +0
-29
lines changed Expand file tree Collapse file tree 1 file changed +0
-29
lines changed Original file line number Diff line number Diff line change @@ -882,32 +882,3 @@ def release_memory() -> None:
882882 logger .warning ("Failed to release CPU memory." )
883883 except Exception :
884884 logger .warning ("Failed to release CPU memory." )
885-
886- elif platform .system () == "Windows" :
887- from ctypes import wintypes
888-
889- kernel32 = ctypes .WinDLL ("kernel32" , use_last_error = True )
890- psapi = ctypes .WinDLL ("psapi" , use_last_error = True )
891-
892- GetCurrentProcess = kernel32 .GetCurrentProcess
893- GetCurrentProcess .restype = wintypes .HANDLE
894- hproc = GetCurrentProcess ()
895-
896- HeapSetInformation = kernel32 .HeapSetInformation
897- HeapSetInformation .argtypes = [
898- wintypes .HANDLE ,
899- ctypes .c_int ,
900- ctypes .c_void_p ,
901- ctypes .c_size_t ,
902- ]
903- HeapSetInformation .restype = wintypes .BOOL
904- GetProcessHeap = kernel32 .GetProcessHeap
905- GetProcessHeap .restype = wintypes .HANDLE
906- ok = False
907- try :
908- HeapOptimizeResources = 3
909- hheap = GetProcessHeap ()
910- if HeapSetInformation (hheap , HeapOptimizeResources , None , 0 ):
911- ok = True
912- except Exception :
913- logger .warning ("Failed to release CPU memory." )
You can’t perform that action at this time.
0 commit comments