We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
util.mman
1 parent c63db69 commit 40199baCopy full SHA for 40199ba
gitdb/util.py
@@ -14,20 +14,11 @@
14
import sys
15
16
from smmap import (
17
- StaticWindowMapManager,
18
- SlidingWindowMapManager,
+ managed_mmaps,
19
SlidingWindowMapBuffer
20
)
21
22
23
-# initialize our global memory manager instance
24
-# Use it to free cached (and unused) resources.
25
-if sys.version_info < (2, 6):
26
- mman = StaticWindowMapManager()
27
-else:
28
- mman = SlidingWindowMapManager()
29
-# END handle mman
30
-
31
#{ Aliases
32
33
hex_to_bin = binascii.a2b_hex
@@ -59,6 +50,9 @@
59
50
60
51
log = logging.getLogger(__name__)
61
52
53
+#: Global MemoryManager, remember to ``mman.collect()`` it.
54
+mman = managed_mmaps(check_entered=False)
55
+
62
56
#{ compatibility stuff ...
63
57
64
58
0 commit comments