Package soot.jimple.infoflow.memory
Class FlowDroidMemoryWatcher
java.lang.Object
soot.jimple.infoflow.memory.FlowDroidMemoryWatcher
FlowDroid's implementation of a handler for the memory warning system
- Author:
- Steven Arzt
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a new instance of theFlowDroidMemoryWatcherclassFlowDroidMemoryWatcher(double threshold) Creates a new instance of theFlowDroidMemoryWatcherclassCreates a new instance of theFlowDroidMemoryWatcherclassFlowDroidMemoryWatcher(InfoflowResults res, double threshold) Creates a new instance of theFlowDroidMemoryWatcherclass -
Method Summary
Modifier and TypeMethodDescriptionvoidaddSolver(IMemoryBoundedSolver solver) Adds a solver that shall be terminated when the memory threshold is reachedvoidClears the list of solvers registered with this memory watchervoidclose()Shuts down the memory watcher and frees all resources associated with itvoidForces the termination of all registered solversvoidForces the termination of all registered solversbooleanremoveSolver(IMemoryBoundedSolver solver) Removes the given solver from the watch list.voidsetTerminationCallback(ISolversTerminatedCallback terminationCallback) Sets a callback that shall be invoked when the solvers have been terminated due to memory exhaustion
-
Constructor Details
-
FlowDroidMemoryWatcher
public FlowDroidMemoryWatcher()Creates a new instance of theFlowDroidMemoryWatcherclass -
FlowDroidMemoryWatcher
public FlowDroidMemoryWatcher(double threshold) Creates a new instance of theFlowDroidMemoryWatcherclass- Parameters:
threshold- The threshold at which to abort the workers
-
FlowDroidMemoryWatcher
Creates a new instance of theFlowDroidMemoryWatcherclass- Parameters:
res- The result object in which to register any abortions
-
FlowDroidMemoryWatcher
Creates a new instance of theFlowDroidMemoryWatcherclass- Parameters:
res- The result object in which to register any abortionsthreshold- The threshold at which to abort the workers
-
-
Method Details
-
addSolver
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
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
Forces the termination of all registered solvers -
setTerminationCallback
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
-