mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-12-23 19:22:45 +01:00
Do a msvcrt.heapmin() during upkeep on Windows
This commit is contained in:
parent
4d43fe11db
commit
db69351721
@ -31,6 +31,7 @@
|
|||||||
|
|
||||||
from fix import *
|
from fix import *
|
||||||
|
|
||||||
|
import os
|
||||||
import gc
|
import gc
|
||||||
import time
|
import time
|
||||||
import copy
|
import copy
|
||||||
@ -38,6 +39,10 @@ import types
|
|||||||
import string
|
import string
|
||||||
import atexit
|
import atexit
|
||||||
import linecache
|
import linecache
|
||||||
|
try:
|
||||||
|
import msvcrt
|
||||||
|
except ImportError:
|
||||||
|
pass
|
||||||
|
|
||||||
import conf
|
import conf
|
||||||
import debug
|
import debug
|
||||||
@ -75,6 +80,8 @@ except NameError:
|
|||||||
|
|
||||||
def upkeep(): # Function to be run on occasion to do upkeep stuff.
|
def upkeep(): # Function to be run on occasion to do upkeep stuff.
|
||||||
gc.collect()
|
gc.collect()
|
||||||
|
if os.name == 'nt':
|
||||||
|
msvcrt.heapmin()
|
||||||
if gc.garbage:
|
if gc.garbage:
|
||||||
debug.debugMsg('Uncollectable garbge: %s' % gc.garbage, 'normal')
|
debug.debugMsg('Uncollectable garbge: %s' % gc.garbage, 'normal')
|
||||||
if 'noflush' not in tempvars:
|
if 'noflush' not in tempvars:
|
||||||
|
Loading…
Reference in New Issue
Block a user