mirror of https://github.com/YosysHQ/yosys.git
Some fixes in libs/minisat (thanks to Siesh1oo)
This commit is contained in:
parent
8127d5e8c3
commit
a4d72de91d
|
@ -79,7 +79,7 @@ double Minisat::memUsed() {
|
|||
struct rusage ru;
|
||||
getrusage(RUSAGE_SELF, &ru);
|
||||
return (double)ru.ru_maxrss / 1024; }
|
||||
double Minisat::memUsedPeak() { return memUsed(); }
|
||||
double Minisat::memUsedPeak(bool) { return memUsed(); }
|
||||
|
||||
|
||||
#elif defined(__APPLE__)
|
||||
|
@ -89,11 +89,11 @@ double Minisat::memUsed() {
|
|||
malloc_statistics_t t;
|
||||
malloc_zone_statistics(NULL, &t);
|
||||
return (double)t.max_size_in_use / (1024*1024); }
|
||||
double Minisat::memUsedPeak() { return memUsed(); }
|
||||
double Minisat::memUsedPeak(bool) { return memUsed(); }
|
||||
|
||||
#else
|
||||
double Minisat::memUsed() { return 0; }
|
||||
double Minisat::memUsedPeak() { return 0; }
|
||||
double Minisat::memUsedPeak(bool) { return 0; }
|
||||
#endif
|
||||
|
||||
|
||||
|
|
|
@ -7,6 +7,7 @@ mv minisat_upstream/LICENSE minisat_upstream/minisat/*/*.{h,cc} .
|
|||
rm -rf minisat_upstream
|
||||
|
||||
sed -i -e 's,^#include *"minisat/[^/]\+,#include "libs/minisat,' *.cc *.h
|
||||
sed -i -e 's/PRIi64/ & /' Options.h
|
||||
sed -i -e 's/Minisat::memUsedPeak()/Minisat::memUsedPeak(bool)/' System.cc
|
||||
sed -i -e 's/PRI[iu]64/ & /' Options.h Solver.cc
|
||||
sed -i -e '1 i #define __STDC_LIMIT_MACROS' *.cc
|
||||
sed -i -e '1 i #define __STDC_FORMAT_MACROS' *.cc
|
||||
|
|
Loading…
Reference in New Issue