def get_own_memusage_linux():
 with open(('/proc/%d/status' % os.getpid()), 'r') as f:
  procdata = f.read()
 m = re.search('VmRSS:\\s*(\\d+)\\s*kB', procdata, (re.S | re.I))
 if (m is not None):
  memusage = (float(m.group(1)) * 1000.0)
  return memusage
 return np.nan

def get_own_memusage_linux ( ) : with open ( ( '/proc/%d/status' % os . getpid ( ) ) , 'r' ) as f : procdata = f . read ( ) m = re . search ( 'VmRSS:\\s*(\\d+)\\s*kB' , procdata , ( re . S | re . I ) ) if ( m is not None ) : memusage = ( float ( m . group ( 1 ) ) * 1000.0 ) return memusage return np . nan
return the memory usage of the current process .