fix compilation problems in garbage collector

git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@1156 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
vsc 2004-10-06 19:40:22 +00:00
parent ac2a3b01af
commit 7efbf340a5
4 changed files with 313 additions and 283 deletions

View File

@ -32,11 +32,6 @@ static char SccsId[] = "%W% %G%";
/* global variables for garbage collection */ /* global variables for garbage collection */
#ifndef DEBUG
static
#endif
static Int Tot_Gc_Recovered = 0; /* number of heap objects in all garbage collections */
/* in a single gc */ /* in a single gc */
static unsigned long int total_marked; /* number of heap objects marked */ static unsigned long int total_marked; /* number of heap objects marked */
@ -3449,7 +3444,7 @@ do_gc(Int predarity, CELL *current_env, yamop *nextop)
} }
gc_time += (c_time-time_start); gc_time += (c_time-time_start);
TotGcTime += gc_time; TotGcTime += gc_time;
Tot_Gc_Recovered += heap_cells-total_marked; TotGcRecovered += heap_cells-total_marked;
if (gc_verbose) { if (gc_verbose) {
fprintf(Yap_stderr, "%% GC %d took %g sec, total of %g sec doing GC so far.\n", GcCalls, (double)gc_time/1000, (double)TotGcTime/1000); fprintf(Yap_stderr, "%% GC %d took %g sec, total of %g sec doing GC so far.\n", GcCalls, (double)gc_time/1000, (double)TotGcTime/1000);
fprintf(Yap_stderr, "%% Left %ld cells free in stacks.\n", fprintf(Yap_stderr, "%% Left %ld cells free in stacks.\n",
@ -3494,7 +3489,7 @@ p_inform_gc(void)
{ {
Term tn = MkIntegerTerm(TotGcTime); Term tn = MkIntegerTerm(TotGcTime);
Term tt = MkIntegerTerm(GcCalls); Term tt = MkIntegerTerm(GcCalls);
Term ts = MkIntegerTerm((Tot_Gc_Recovered*sizeof(CELL))); Term ts = MkIntegerTerm((TotGcRecovered*sizeof(CELL)));
return(Yap_unify(tn, ARG2) && Yap_unify(tt, ARG1) && Yap_unify(ts, ARG3)); return(Yap_unify(tn, ARG2) && Yap_unify(tt, ARG1) && Yap_unify(ts, ARG3));

View File

@ -287,3 +287,6 @@
#undef HAVE_GCC #undef HAVE_GCC
#endif #endif
#endif #endif
#undef GC_NO_TAGS

574
configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -45,6 +45,9 @@ AC_ARG_ENABLE(pthread-locking,
AC_ARG_ENABLE(max-performance, AC_ARG_ENABLE(max-performance,
[ --enable-max-performance try using the best flags for specific architecture ], [ --enable-max-performance try using the best flags for specific architecture ],
maxperformance="$enableval", maxperformance=no) maxperformance="$enableval", maxperformance=no)
AC_ARG_ENABLE(max-memory,
[ --enable-max-memory try using the best flags for using the memory to the most ],
maxmemory="$enableval", maxmemory=no)
AC_ARG_ENABLE(debug-yap, AC_ARG_ENABLE(debug-yap,
[ --enable-debug-yap enable C-debugging for YAP ], [ --enable-debug-yap enable C-debugging for YAP ],
debugyap="$enableval", debugyap=no) debugyap="$enableval", debugyap=no)
@ -1062,6 +1065,13 @@ dnl disable smart memory management
if test "$use_malloc" = yes if test "$use_malloc" = yes
then then
AC_DEFINE(USE_MALLOC,1) AC_DEFINE(USE_MALLOC,1)
AC_DEFINE(GC_NO_TAGS,1)
fi
dnl disable smart memory management
if test "$maxmemory" = yes
then
AC_DEFINE(GC_NO_TAGS,1)
fi fi
mkdir -p library/mpi mkdir -p library/mpi