#NEWLINE# def trace_max_mem( self , frame , event , arg ) : #NEWLINE# #INDENT# if ( ( event in ( 'line' , 'return' ) ) and ( frame . f_code in self . code_map ) ) : #NEWLINE# #INDENT# c = _get_memory ( ( - 1 ) ) #NEWLINE# if ( c >= self . max_mem ) : #NEWLINE# #INDENT# t = 'Current memory {0:.2f} MiB exceeded the maximum of {1:.2f} MiB\n' . format ( c , self . max_mem ) #NEWLINE# sys . stdout . write ( t ) #NEWLINE# sys . stdout . write ( 'Stepping into the debugger \n' ) #NEWLINE# frame . f_lineno -= 2 #NEWLINE# p = pdb . Pdb ( ) #NEWLINE# p . quitting = False #NEWLINE# p . stopframe = arg #NEWLINE# p . returnframe = None #NEWLINE# p . stoplineno = ( frame . f_lineno - 3 ) #NEWLINE# p . botframe = None #NEWLINE# return p . trace_dispatch #NEWLINE# #UNINDENT# #UNINDENT# if ( self . _original_trace_function is not None ) : #NEWLINE# #INDENT# self . _original_trace_function ( frame , event , arg ) #NEWLINE# #UNINDENT# return self . trace_max_mem