summaryrefslogtreecommitdiffstats
path: root/src/H5Sselect.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2004-04-06 18:51:26 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2004-04-06 18:51:26 (GMT)
commitb230f3eb22e16932dc664970ade0021831e2fc5f (patch)
treeb72c6bc2f2f9a6fafef1906159794c9b3d56e378 /src/H5Sselect.c
parent45878f9a8adac2d93c8a6ba42e09fff043d41adb (diff)
downloadhdf5-b230f3eb22e16932dc664970ade0021831e2fc5f.zip
hdf5-b230f3eb22e16932dc664970ade0021831e2fc5f.tar.gz
hdf5-b230f3eb22e16932dc664970ade0021831e2fc5f.tar.bz2
[svn-r8312] Purpose:
Code optimization Description: Eliminate unnecessary allocation and point at existing data structure instead. Platforms tested: Solaris 2.7 (arabica) too minor to require h5committest
Diffstat (limited to 'src/H5Sselect.c')
-rw-r--r--src/H5Sselect.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/src/H5Sselect.c b/src/H5Sselect.c
index 9156971..677d7d5 100644
--- a/src/H5Sselect.c
+++ b/src/H5Sselect.c
@@ -44,9 +44,6 @@ static herr_t H5S_select_iter_next_block(H5S_sel_iter_t *iter);
/* Declare external the free list for hssize_t arrays */
H5FL_ARR_EXTERN(hssize_t);
-/* Declare external the free list for hsize_t arrays */
-H5FL_ARR_EXTERN(hsize_t);
-
/* Declare a free list to manage sequences of size_t */
H5FL_SEQ_DEFINE_STATIC(size_t);
@@ -570,12 +567,8 @@ H5S_select_iter_init(H5S_sel_iter_t *sel_iter, const H5S_t *space, size_t elmt_s
sel_iter->rank=space->extent.u.simple.rank;
if(sel_iter->rank>0) {
- /* Allocate room for the dataspace dimensions */
- sel_iter->dims = H5FL_ARR_MALLOC(hsize_t,sel_iter->rank);
- assert(sel_iter->dims);
-
- /* Keep a copy of the dataspace dimensions */
- HDmemcpy(sel_iter->dims,space->extent.u.simple.size,sel_iter->rank*sizeof(hsize_t));
+ /* Point to the dataspace dimensions */
+ sel_iter->dims=space->extent.u.simple.size;
} /* end if */
else
sel_iter->dims = NULL;
@@ -839,9 +832,6 @@ H5S_select_iter_release(H5S_sel_iter_t *sel_iter)
/* Check args */
assert(sel_iter);
- /* Release the array of dimensions common to all iterators */
- H5FL_ARR_FREE(hsize_t,sel_iter->dims);
-
/* Call selection type-specific release routine */
ret_value = (*sel_iter->iter_release)(sel_iter);