|
From: <ai...@us...> - 2011-09-25 16:40:37
|
Revision: 11936
http://plplot.svn.sourceforge.net/plplot/?rev=11936&view=rev
Author: airwin
Date: 2011-09-25 16:40:30 +0000 (Sun, 25 Sep 2011)
Log Message:
-----------
Allow plend to completely remove certain of our device drivers that do
not depend on any libraries other than libplplotd. This change restores clean
valgrind results for, e.g., -dev svg and -dev psc.
Modified Paths:
--------------
trunk/src/plcore.c
Modified: trunk/src/plcore.c
===================================================================
--- trunk/src/plcore.c 2011-09-25 16:09:38 UTC (rev 11935)
+++ trunk/src/plcore.c 2011-09-25 16:40:30 UTC (rev 11936)
@@ -3272,11 +3272,21 @@
driver->drvnam, drvspec );
driver->dlhand = lt_dlopenext( drvspec );
-
- // Mark all drivers resident to prevent problems
- // with atexit handlers / library reinitialisation such
- // as those seen with qt and cairo drivers.
- lt_dlmakeresident(driver->dlhand);
+
+ // A few of our drivers do not depend on other libraries. So
+ // allow them to be completely removed by plend to give clean
+ // valgrind results. However, the (large) remainder of our
+ // drivers do depend on other libraries so mark them resident
+ // to prevent problems with atexit handlers / library
+ // reinitialisation such as those seen with qt and cairo
+ // drivers.
+ if ( !( strcmp( driver->drvnam, "mem" ) == 0 ||
+ strcmp( driver->drvnam, "null" ) == 0 ||
+ strcmp( driver->drvnam, "plmeta" ) == 0 ||
+ strcmp( driver->drvnam, "ps" ) == 0 ||
+ strcmp( driver->drvnam, "svg" ) == 0 ||
+ strcmp( driver->drvnam, "xfig" ) == 0 ) )
+ lt_dlmakeresident( driver->dlhand );
}
// If it still isn't loaded, then we're doomed.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|