sys.getallocatedblocks()
Return the number of memory blocks currently allocated by the interpreter, regardless of their size. This function is mainly useful for tracking and debugging memory leaks. Because of the interpreter’s internal caches, the result can vary from call to call; you may have to call _clear_type_cache()
and gc.collect()
to get more predictable results.
If a Python build or implementation cannot reasonably compute this information, getallocatedblocks()
is allowed to return 0 instead.
New in version 3.4.
Please login to continue.