Do a msvcrt.heapmin() during upkeep on Windows

This commit is contained in:
Jeremy Fincher 2003-03-26 02:31:13 +00:00
parent 4d43fe11db
commit db69351721

View File

@ -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: