MCPcopy Create free account
hub / github.com/apache/arrow / check_bytes_allocated

Function check_bytes_allocated

python/pyarrow/tests/test_dlpack.py:72–81  ·  view source on GitHub ↗
(f)

Source from the content-addressed store, hash-verified

70
71
72def check_bytes_allocated(f):
73 @wraps(f)
74 def wrapper(*args, **kwargs):
75 gc.collect()
76 allocated_bytes = pa.total_allocated_bytes()
77 try:
78 return f(*args, **kwargs)
79 finally:
80 assert pa.total_allocated_bytes() == allocated_bytes
81 return wrapper
82
83
84@check_bytes_allocated

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected