diff options
author | Sebastian Thiel <byronimo@gmail.com> | 2011-07-05 18:17:26 +0200 |
---|---|---|
committer | Sebastian Thiel <byronimo@gmail.com> | 2011-07-05 18:17:26 +0200 |
commit | bf638fd0c389e3eec0c054dfb97d3a57abab918d (patch) | |
tree | b32d5b271cb1c1adfb091d7b29d0ee0033c1866a /git/util.py | |
parent | da12df95faf27f2d69c9b69391c61b584e16614d (diff) | |
parent | f0c05ea8da7932961af162bb30231640b89e40bc (diff) | |
download | gitpython-bf638fd0c389e3eec0c054dfb97d3a57abab918d.tar.gz |
Merge branch 'smmap'
Diffstat (limited to 'git/util.py')
-rw-r--r-- | git/util.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/git/util.py b/git/util.py index a31e5865..0e7e4cba 100644 --- a/git/util.py +++ b/git/util.py @@ -15,6 +15,13 @@ import time import stat import shutil import tempfile +from smmap import ( + StaticWindowMapManager, + SlidingWindowMapManager, + SlidingWindowMapBuffer + ) + + __all__ = ( "stream_copy", "join_path", "to_native_path_windows", "to_native_path_linux", "join_path_native", "Stats", "IndexFileSHA1Writer", "Iterable", "IterableList", @@ -64,6 +71,14 @@ except ImportError: # will be handled in the main thread pool = ThreadPool(0) +# initialize our global memory manager instance +# Use it to free cached (and unused) resources. +if sys.version_info[1] < 6: + mman = StaticWindowMapManager() +else: + mman = SlidingWindowMapManager() +#END handle mman + #} END globals |