diff options
Diffstat (limited to 'src/sat')
-rw-r--r-- | src/sat/bsat/satSolver2.c | 7 | ||||
-rw-r--r-- | src/sat/bsat/satSolver2.h | 2 |
2 files changed, 5 insertions, 4 deletions
diff --git a/src/sat/bsat/satSolver2.c b/src/sat/bsat/satSolver2.c index 573c1d35..c6eedeb5 100644 --- a/src/sat/bsat/satSolver2.c +++ b/src/sat/bsat/satSolver2.c @@ -1621,12 +1621,13 @@ void sat_solver2_rollback( sat_solver2* s ) } // returns memory in bytes used by the SAT solver -double sat_solver2_memory( sat_solver2* s ) +double sat_solver2_memory( sat_solver2* s, int fAll ) { int i; double Mem = sizeof(sat_solver2); - for (i = 0; i < s->cap*2; i++) - Mem += s->wlists[i].cap * sizeof(int); + if ( fAll ) + for (i = 0; i < s->cap*2; i++) + Mem += s->wlists[i].cap * sizeof(int); Mem += s->cap * sizeof(veci); // ABC_FREE(s->wlists ); Mem += s->clauses.cap * sizeof(int); Mem += s->learnts.cap * sizeof(int); diff --git a/src/sat/bsat/satSolver2.h b/src/sat/bsat/satSolver2.h index d1179422..5f847f68 100644 --- a/src/sat/bsat/satSolver2.h +++ b/src/sat/bsat/satSolver2.h @@ -49,7 +49,7 @@ extern int sat_solver2_simplify(sat_solver2* s); extern int sat_solver2_solve(sat_solver2* s, lit* begin, lit* end, ABC_INT64_T nConfLimit, ABC_INT64_T nInsLimit, ABC_INT64_T nConfLimitGlobal, ABC_INT64_T nInsLimitGlobal); extern void sat_solver2_rollback(sat_solver2* s); extern void sat_solver2_reducedb(sat_solver2* s); -extern double sat_solver2_memory( sat_solver2* s ); +extern double sat_solver2_memory( sat_solver2* s, int fAll ); extern double sat_solver2_memory_proof( sat_solver2* s ); extern void sat_solver2_setnvars(sat_solver2* s,int n); |