summaryrefslogtreecommitdiffstats
path: root/src/H5Distore.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2007-05-29 20:02:34 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2007-05-29 20:02:34 (GMT)
commitbdcbada3f282774f709e17990dc7f77b24919950 (patch)
treef2f1264f0a3c7ac08b78eb314358ce1ee62aa5a5 /src/H5Distore.c
parent7b0fa3950e74ea0c9bfe3baa07a48e2d451ebab5 (diff)
downloadhdf5-bdcbada3f282774f709e17990dc7f77b24919950.zip
hdf5-bdcbada3f282774f709e17990dc7f77b24919950.tar.gz
hdf5-bdcbada3f282774f709e17990dc7f77b24919950.tar.bz2
[svn-r13814] Description:
Change back to clearing memory buffers by default, but give users option to disable this, for performance reasons (--disable-clear-file-buffers). Also, add configure option (--enable-using-memchecker) to conveniently control making the library "play nice" with memory checking tools like valgrind and purify. Tested on: Mac OS X/32 10.4.9 (amazon) FreeBSD/32 6.2 (duty) Linux/32 2.6 (kagiso)
Diffstat (limited to 'src/H5Distore.c')
-rw-r--r--src/H5Distore.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/H5Distore.c b/src/H5Distore.c
index f770e98..702b887 100644
--- a/src/H5Distore.c
+++ b/src/H5Distore.c
@@ -1526,9 +1526,9 @@ H5D_istore_shared_create (const H5F_t *f, H5O_layout_t *layout)
assert(shared->sizeof_rnode);
if(NULL==(shared->page=H5FL_BLK_MALLOC(chunk_page,shared->sizeof_rnode)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for B-tree page")
-#ifdef H5_USING_PURIFY
-HDmemset(shared->page,0,shared->sizeof_rnode);
-#endif /* H5_USING_PURIFY */
+#ifdef H5_CLEAR_MEMORY
+HDmemset(shared->page, 0, shared->sizeof_rnode);
+#endif /* H5_CLEAR_MEMORY */
if(NULL==(shared->nkey=H5FL_SEQ_MALLOC(size_t,(size_t)(2*H5F_KVALUE(f,H5B_ISTORE)+1))))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for B-tree page")
@@ -1859,10 +1859,10 @@ H5D_istore_lock(const H5D_io_info_t *io_info, H5D_istore_ud1_t *udata,
HDmemset(chunk, 0, chunk_size);
} /* end else */
} /* end if */
-#ifdef H5_USING_PURIFY
-else
- HDmemset(chunk, 0, chunk_size);
-#endif /* H5_USING_PURIFY */
+#ifdef H5_CLEAR_MEMORY
+ else
+ HDmemset(chunk, 0, chunk_size);
+#endif /* H5_CLEAR_MEMORY */
#ifdef H5D_ISTORE_DEBUG
rdcc->ninits++;
#endif /* H5D_ISTORE_DEBUG */