summaryrefslogtreecommitdiff
path: root/git/util.py
diff options
context:
space:
mode:
Diffstat (limited to 'git/util.py')
-rw-r--r--git/util.py15
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