65c8413f380799670378ca1c56febeb5378be8b7,lazyflow/operators/cacheMemoryManager.py,CacheMemoryManager,_cleanup,#CacheMemoryManager#,209

Before Change


            c = None
            caches = None

            if current_usage_percentage > self._target_usage and len(q) > 0:
                current_usage_percentage = memoryUsagePercentage()
                self.logger.debug("Memory usage is: {}%".format(100*current_usage_percentage))
                
            while current_usage_percentage > self._target_usage and len(q) > 0:
                t, info, cleanupFun = q.pop()
                self.logger.debug("Cleaning up {}".format(info))
                cleanupFun()

After Change


                    info, mem/1024.0/1024.0))
                total -= mem
                current_usage_percentage = total/float(getAvailableRamBytes())*100
            gc.collect()
            // don"t keep a reference until next loop iteration
            cleanupFun = None
            q = None
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: ilastik/ilastik
Commit Name: 65c8413f380799670378ca1c56febeb5378be8b7
Time: 2015-04-10
Author: webmaster@burgerdev.de
File Name: lazyflow/operators/cacheMemoryManager.py
Class Name: CacheMemoryManager
Method Name: _cleanup


Project Name: mne-tools/mne-python
Commit Name: 0efe6ae6643123c99cd90a7228c8db04a3569c82
Time: 2020-12-17
Author: larson.eric.d@gmail.com
File Name: doc/conf.py
Class Name: Resetter
Method Name: __call__


Project Name: dPys/PyNets
Commit Name: 2fedef89ec6a1d018d879b21b594634944472708
Time: 2020-03-19
Author: dpisner@utexas.edu
File Name: pynets/dmri/track.py
Class Name:
Method Name: track_ensemble