summaryrefslogtreecommitdiffstats
path: root/src/H5S.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2004-06-16 18:56:52 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2004-06-16 18:56:52 (GMT)
commit32336040a288858b1775817ea8c0b5d0bfc23517 (patch)
tree50f92ab448a0c71acf2d2594cbfc21b65f0a3d59 /src/H5S.c
parent2b81894af7cad966189d2b1303d3814f33f1e196 (diff)
downloadhdf5-32336040a288858b1775817ea8c0b5d0bfc23517.zip
hdf5-32336040a288858b1775817ea8c0b5d0bfc23517.tar.gz
hdf5-32336040a288858b1775817ea8c0b5d0bfc23517.tar.bz2
[svn-r8696] Purpose:
Code optimizations Description: Eliminate memset() call in H5S_set_extent_simple(). Use malloc() instead of calloc in H5B<mumble>. Change global heap code to track heap objects that are in use in order to allocate new objects more quickly and also to avoid memset() and calloc() calls. Platforms tested: Solaris 2.7 (arabica) FreeBSD 4.10 (sleipnir) w/parallel Too minor to require h5committest
Diffstat (limited to 'src/H5S.c')
-rw-r--r--src/H5S.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/H5S.c b/src/H5S.c
index 152d6a0..0de9190 100644
--- a/src/H5S.c
+++ b/src/H5S.c
@@ -1328,6 +1328,7 @@ static herr_t
H5S_set_extent_simple (H5S_t *space, unsigned rank, const hsize_t *dims,
const hsize_t *max)
{
+ unsigned u; /* Local index variable */
herr_t ret_value=SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(H5S_set_extent_simple, FAIL);
@@ -1346,7 +1347,6 @@ H5S_set_extent_simple (H5S_t *space, unsigned rank, const hsize_t *dims,
space->extent.rank = 0; /* set to scalar rank */
} else {
hsize_t nelem; /* Number of elements in extent */
- unsigned u; /* Local index variable */
space->extent.type = H5S_SIMPLE;
@@ -1371,7 +1371,8 @@ H5S_set_extent_simple (H5S_t *space, unsigned rank, const hsize_t *dims,
/* Selection related cleanup */
/* Set offset to zeros */
- HDmemset(space->select.offset,0,sizeof(hssize_t)*rank);
+ for(u=0; u<space->extent.rank; u++)
+ space->select.offset[u]=0;
/* If the selection is 'all', update the number of elements selected */
if(H5S_GET_SELECT_TYPE(space)==H5S_SEL_ALL)