Predator  [unstable] git snapshot
Data Structures | Macros | Functions
symgc.hh File Reference

collectJunk - implementation of a garbage collector for the symbolic heap More...

#include "symheap.hh"
#include <boost/foreach.hpp>

Go to the source code of this file.

Data Structures

class  LeakMonitor

Macros

#define REQUIRE_GC_ACTIVITY(sh, obj, fnc)

Functions

bool collectJunk (SymHeap &sh, TObjId obj, TObjSet *leakObjs=0)
 collect and remove all junk reachable from the given object
bool collectSharedJunk (SymHeap &sh, TObjId obj, TObjSet *leakObjs=0)
 same as collectJunk(), but does not consider prototypes to be junk objects
bool destroyObjectAndCollectJunk (SymHeap &sh, TObjId obj, TObjSet *leakObjs=0)
void debugGarbageCollector (bool enable)
 enable/disable debugging of the garbage collector

Detailed Description

collectJunk - implementation of a garbage collector for the symbolic heap

Definition in file symgc.hh.

Macro Definition Documentation

#define REQUIRE_GC_ACTIVITY (   sh,
  obj,
  fnc 
)
Value:
do { \
if (collectJunk(sh, obj)) \
break; \
CL_ERROR(#fnc "() failed to collect garbage, " #obj " still referenced"); \
CL_BREAK_IF("REQUIRE_GC_ACTIVITY has not been successful"); \
} while (0)

Definition at line 32 of file symgc.hh.

Function Documentation

bool collectJunk ( SymHeap sh,
TObjId  obj,
TObjSet leakObjs = 0 
)

collect and remove all junk reachable from the given object

Referenced by LeakMonitor::collectJunkFrom().

bool collectSharedJunk ( SymHeap sh,
TObjId  obj,
TObjSet leakObjs = 0 
)

same as collectJunk(), but does not consider prototypes to be junk objects

void debugGarbageCollector ( bool  enable)

enable/disable debugging of the garbage collector

bool destroyObjectAndCollectJunk ( SymHeap sh,
TObjId  obj,
TObjSet leakObjs = 0 
)