[Monetdb-developers] [Monetdb-pf-checkins] pathfinder configure.ag, 1.91, 1.92

Peter Boncz boncz at cwi.nl
Mon Jan 22 13:43:39 CET 2007

Hi Jan,

As I have indicated, use of the Boehm garbage collector inside the MonetDB
process is not really an option.

If algebra plans can only be compiled with Boehm, than it will become very
difficult to use pathfinder inside MonetDB/XQuery.

Did you try the option with memory sandboxes that at certain critical stages
can be cleared?


-----Original Message-----
From: monetdb-pf-checkins-bounces at lists.sourceforge.net
[mailto:monetdb-pf-checkins-bounces at lists.sourceforge.net]On Behalf Of
Jan Rittinger
Sent: 22 January 2007 12:26
To: monetdb-pf-checkins at lists.sourceforge.net
Subject: [Monetdb-pf-checkins] pathfinder configure.ag,1.91,1.92

Update of /cvsroot/monetdb/pathfinder
In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv7979

Modified Files:
Log Message:
-- Re-integrated Hans Boehms garbage collection library.

   * This was necessary because more complex queries did run out of memory.
     (Before we did allocate memory and only freed it at the end. Snapshot
     based freeing -- meaning after a full tree copy was made -- did help
     but was a lot slower than using the garbage collection library.)

   * The old memory allocation (without garbage collection) is still in use
     whenever pathfinder is used in embedded mode (e.g. if the xquery()
     command in MonetDB is used).

   * If the garbage collection library is not detected during configure
     we avoid to generate an error and use the old memory allocation

   * The drawback of this change is that the compilation of simple queries
     is now lot slower (e.g. XMark Q6 takes 400ms to compile).

Index: configure.ag
RCS file: /cvsroot/monetdb/pathfinder/configure.ag,v
retrieving revision 1.91
retrieving revision 1.92
diff -u -d -r1.91 -r1.92
--- configure.ag	21 Jan 2007 16:01:38 -0000	1.91
+++ configure.ag	22 Jan 2007 11:25:59 -0000	1.92
@@ -334,6 +334,70 @@
 AM_CONDITIONAL(HAVE_LIBXML2, test x"$have_libxml2" != xno)

+dnl See if we have the Hans Boehm garbage collector available
+dnl First allow the user to specify a location on the command line.
+dnl Further down see if we find the library and abort if not.
+    [  --with-gc=DIR           Boehm garbage collector library is installed
in DIR],
+    [have_gc="$withval"], [have_gc="auto"])
+if test "x$have_gc" != xauto; then
+        LIBGC_CFLAGS="-I$have_gc/include"
+        LIBGC_LIBS="-L$have_gc/lib"
+if test "x$have_gc" = xauto; then
+        LIBGC_CFLAGS=""
+        LIBGC_LIBS=""
+dnl If we have the dl and/or the pthread library, use it
+dnl (dl and/or pthread are required for the garbage collection
+dnl library on some systems.)
+AC_CHECK_LIB(dl, dlopen, [LIBGC_LDADD="$LIBGC_LDADD -ldl"])
+AC_CHECK_LIB(pthread, pthread_create,
+    [ dnl See if we can link in the gc library.
+      dnl If we have found the dl and/or pthread library as well, also use
+      dnl If the gc library was not found, clear LIBGC_LDADD.
+      AC_CHECK_LIB(gc, GC_malloc,
+                   [LIBGC_LDADD="$LIBGC_LDADD -lgc"],
+                   [LIBGC_LDADD=""], [$LIBGC_LDADD])],
+    [ LIBGC_LDADD=""])
+if test "x$LIBGC_LDADD" = "x"; then
+    AC_MSG_WARN([Unable to find the Hans Boehm garbage collector.
+                 Please go get it from
+                 http://www.hpl.hp.com/personal/Hans_Boehm/gc/
+                 (Compilation will use memory allocation only strategy
+    AC_DEFINE(HAVE_GC, 0, [Define if you use garbage collection])
+if test "x$LIBGC_LDADD" != "x"; then
+    AC_DEFINE(HAVE_GC, 1, [Define if you use garbage collection])
+dnl Propagate the variable to the Makefiles
 # have_pftijah=no
 # AM_CONDITIONAL(HAVE_PFTIJAH, test "x$have_pftijah" == xyes)

Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
Monetdb-pf-checkins mailing list
Monetdb-pf-checkins at lists.sourceforge.net

More information about the developers-list mailing list