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

Class BufferWrapper

Lib/multiprocessing/heap.py:322–333  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

320#
321
322class BufferWrapper(object):
323
324 _heap = Heap()
325
326 def __init__(self, size):
327 block = BufferWrapper._heap.malloc(size)
328 self._state = (block, size)
329 util.Finalize(self, BufferWrapper._heap.free, args=(block,))
330
331 def create_memoryview(self):
332 (arena, start, stop), size = self._state
333 return memoryview(arena.buffer)[start:start+size]

Callers 1

__init__Method · 0.85

Calls 1

HeapClass · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…