diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2004-07-26 04:41:48 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2004-07-26 04:41:48 (GMT) |
commit | 7a07c6cc133e62f5f00e6a4baf214c9011657800 (patch) | |
tree | 8f3407f18b78c8b0283f0663fd0ba0a4ee608212 /src/H5Distore.c | |
parent | 6543e55efad7ded7f5a0e0dc50786c966aea6b98 (diff) | |
download | hdf5-7a07c6cc133e62f5f00e6a4baf214c9011657800.zip hdf5-7a07c6cc133e62f5f00e6a4baf214c9011657800.tar.gz hdf5-7a07c6cc133e62f5f00e6a4baf214c9011657800.tar.bz2 |
[svn-r8946] Purpose:
Code cleanup, sorta
Description:
Added ifdef sections for "H5_USING_PURIFY" in various places in the code,
which are designed to reduce the spurious "uninitialized memory read" warnings
from purify which are actually OK. Note that this macro will have to be
turned on by adding it to the CFLAGS for the build - I didn't think it was
important enough to add a configure flag for.
Also, the changes in H5HG.c optimize the walks through the objects in a
heap to only look at the 'used' entries instead of all the 'allocated' entries.
Platforms tested:
Solaris 2.7 (arabica) w/purify
Not tested by h5committest
Diffstat (limited to 'src/H5Distore.c')
-rw-r--r-- | src/H5Distore.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/H5Distore.c b/src/H5Distore.c index da9776a..596350b 100644 --- a/src/H5Distore.c +++ b/src/H5Distore.c @@ -960,6 +960,9 @@ H5D_istore_init (H5F_t *f, H5D_t *dset) 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 */ 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") @@ -1597,6 +1600,10 @@ H5D_istore_lock(H5F_t *f, const H5D_dxpl_cache_t *dxpl_cache, hid_t dxpl_id, HDmemset (chunk, 0, chunk_size); } /* end else */ } /* end if */ +#ifdef H5_USING_PURIFY +else + HDmemset(ret_value,0,size); +#endif /* H5_USING_PURIFY */ rdcc->ninits++; } /* end else */ } |