Changeset: b3c22d98674b for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=b3c22d98674b
Modified Files:
MonetDB/src/gdk/gdk_storage.mx
Branch: Oct2010
Log Message:
Clear memory to help valgrind (when assertions are enabled).
diffs (16 lines):
diff -r f3d39df4a7dc -r b3c22d98674b MonetDB/src/gdk/gdk_storage.mx
--- a/MonetDB/src/gdk/gdk_storage.mx Tue Oct 12 09:26:43 2010 +0200
+++ b/MonetDB/src/gdk/gdk_storage.mx Tue Oct 12 17:33:47 2010 +0200
@@ -344,6 +344,12 @@
GDKsyserror("GDKload: cannot read:
name=%s, ext=%s, " SZFMT " bytes missing.\n", nme, ext ? ext : "", (size_t)
n_expected);
ret = NULL;
}
+#ifndef NDEBUG
+ /* just to make valgrind happy, we
+ initialize the whole thing */
+ if (ret && maxsize > size)
+ memset(ret + size, 0, maxsize - size);
+#endif
}
close(fd);
} else {
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list