This Page

mmf.utils.debug

Memory() This class represents the current state of memory.
check_point() Set a checkpoint consisting of the current objects in memory.
count_objects() Return the number of objects alive.
new() Set a checkpoint consisting of the current objects in memory.
get_all_objects() Return a list of all live Python

Debugging tools

class mmf.utils.debug.Memory[source]

Bases: object

This class represents the current state of memory.

Example: (Don’t run these with code coverage testing or else you may run out of memory!) >> m = Memory() # doctest: +ELLIPSIS Checkpointed ... objects. >> m.new() # Now look at new objects

Methods

checkpoint() Take a snapshot of the current state of the memory.
ignore(e) Ignore the specified object.
new() Return a dictionary of all new objects.
__init__()[source]
checkpoint()[source]

Take a snapshot of the current state of the memory.

ignore(e)[source]

Ignore the specified object.

new()[source]

Return a dictionary of all new objects.

mmf.utils.debug.check_point()[source]

Set a checkpoint consisting of the current objects in memory.

mmf.utils.debug.count_objects()[source]

Return the number of objects alive.

mmf.utils.debug.new()[source]

Set a checkpoint consisting of the current objects in memory.

mmf.utils.debug.get_all_objects()[source]

Return a list of all live Python objects, not including the list itself.