瀏覽代碼

Remove mmap offset parameter use for now, as it appears to be broken and I have no good way to test it.

Jelmer Vernooij 16 年之前
父節點
當前提交
6b3f2b78f2
共有 1 個文件被更改,包括 2 次插入7 次删除
  1. 2 7
      dulwich/pack.py

+ 2 - 7
dulwich/pack.py

@@ -107,13 +107,8 @@ def simple_mmap(f, offset, size, access=mmap.ACCESS_READ):
     :param access: Access mechanism.
     :param access: Access mechanism.
     :return: MMAP'd area.
     :return: MMAP'd area.
     """
     """
-    if supports_mmap_offset:
-        return (mmap.mmap(f.fileno(), size, access=access, 
-                    offset=int(offset / mmap.ALLOCATIONGRANULARITY)), 
-                (offset % mmap.ALLOCATIONGRANULARITY))
-    else:
-        mem = mmap.mmap(f.fileno(), size+offset, access=access)
-        return mem, offset
+    mem = mmap.mmap(f.fileno(), size+offset, access=access)
+    return mem, offset
 
 
 
 
 def load_pack_index(filename):
 def load_pack_index(filename):