mem_usage

mdtools.run_time_info.mem_usage(unit='MiB')[source]

Get current memory usage.

Returns the current memory usage of the process that calls this function.

Parameters

unit ({‘B’, ‘KiB’, ‘MiB’, ‘GiB’, ‘TiB’, ‘PiB’, ‘KB’, ‘MB’, ‘GB’, ‘TB’, ‘PB’}) – String determining the unit in which the memory usage should be returned. Default is mebibytes ('MiB').

Returns

mem – Memory currently used by the calling process. Returns None if the memory usage cannot be determined.

Return type

float