MCPcopy Index your code
hub / github.com/python/cpython / _choose_dir

Method _choose_dir

Lib/multiprocessing/heap.py:91–98  ·  view source on GitHub ↗
(self, size)

Source from the content-addressed store, hash-verified

89 self.buffer = mmap.mmap(self.fd, self.size)
90
91 def _choose_dir(self, size):
92 # Choose a non-storage backed directory if possible,
93 # to improve performance
94 for d in self._dir_candidates:
95 st = os.statvfs(d)
96 if st.f_bavail * st.f_frsize >= size: # enough free space?
97 return d
98 return util.get_temp_dir()
99
100 def reduce_arena(a):
101 if a.fd == -1:

Callers 1

__init__Method · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected