Class FlowDroidMemoryWatcher

java.lang.Object
soot.jimple.infoflow.memory.FlowDroidMemoryWatcher

public class FlowDroidMemoryWatcher extends Object
FlowDroid's implementation of a handler for the memory warning system
Author:
Steven Arzt
  • Constructor Details

    • FlowDroidMemoryWatcher

      public FlowDroidMemoryWatcher()
      Creates a new instance of the FlowDroidMemoryWatcher class
    • FlowDroidMemoryWatcher

      public FlowDroidMemoryWatcher(double threshold)
      Creates a new instance of the FlowDroidMemoryWatcher class
      Parameters:
      threshold - The threshold at which to abort the workers
    • FlowDroidMemoryWatcher

      public FlowDroidMemoryWatcher(InfoflowResults res)
      Creates a new instance of the FlowDroidMemoryWatcher class
      Parameters:
      res - The result object in which to register any abortions
    • FlowDroidMemoryWatcher

      public FlowDroidMemoryWatcher(InfoflowResults res, double threshold)
      Creates a new instance of the FlowDroidMemoryWatcher class
      Parameters:
      res - The result object in which to register any abortions
      threshold - The threshold at which to abort the workers
  • Method Details

    • addSolver

      public void addSolver(IMemoryBoundedSolver solver)
      Adds a solver that shall be terminated when the memory threshold is reached
      Parameters:
      solver - A solver that shall be terminated when the memory threshold is reached
    • removeSolver

      public boolean removeSolver(IMemoryBoundedSolver solver)
      Removes the given solver from the watch list. The given solver will no longer ne notified when the memory threshold is reached.
      Parameters:
      solver - The solver to remove from the watch list
      Returns:
      True if the given solver was found in the watch list, otherwise false
    • clearSolvers

      public void clearSolvers()
      Clears the list of solvers registered with this memory watcher
    • close

      public void close()
      Shuts down the memory watcher and frees all resources associated with it
    • forceTerminate

      public void forceTerminate()
      Forces the termination of all registered solvers
    • forceTerminate

      public void forceTerminate(ISolverTerminationReason reason)
      Forces the termination of all registered solvers
    • setTerminationCallback

      public void setTerminationCallback(ISolversTerminatedCallback terminationCallback)
      Sets a callback that shall be invoked when the solvers have been terminated due to memory exhaustion
      Parameters:
      terminationCallback - The callback to invoke when the solvers have been terminated due to memory exhaustion