summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRaymond Lu <songyulu@hdfgroup.org>2013-03-22 22:29:55 (GMT)
committerRaymond Lu <songyulu@hdfgroup.org>2013-03-22 22:29:55 (GMT)
commit865bf6bcb28273de759600a3e3ac4cd31e9788b4 (patch)
tree042d97eae71024f4440b8d492ddccb6f5df1a2e8 /src
parent8ffd55478e11904f193b4a98477b3bcb452b93ac (diff)
parent99b15244742caf98b5ff634f34d880fd0089d8d4 (diff)
downloadhdf5-865bf6bcb28273de759600a3e3ac4cd31e9788b4.zip
hdf5-865bf6bcb28273de759600a3e3ac4cd31e9788b4.tar.gz
hdf5-865bf6bcb28273de759600a3e3ac4cd31e9788b4.tar.bz2
[svn-r23435] ported revisions 23346:23432 from the trunk
Diffstat (limited to 'src')
-rw-r--r--src/H5FDmulti.c144
-rw-r--r--src/H5FDmulti.h3
-rw-r--r--src/H5Tconv.c19
-rw-r--r--src/H5public.h4
-rw-r--r--src/Makefile.in2
5 files changed, 14 insertions, 158 deletions
diff --git a/src/H5FDmulti.c b/src/H5FDmulti.c
index 5bdfbbe..9d6e065 100644
--- a/src/H5FDmulti.c
+++ b/src/H5FDmulti.c
@@ -726,150 +726,6 @@ H5FD_multi_dxpl_cls_cb(const char *name, size_t size, void *_dx)
return 0;
} /* end H5FD_multi_dxpl_cls_cb() */
-
-
-/*-------------------------------------------------------------------------
- * Function: H5Pset_dxpl_multi
- *
- * Purpose: Set the data transfer property list DXPL_ID to use the multi
- * driver with the specified data transfer properties for each
- * memory usage type MEMB_DXPL[] (after the usage map is
- * applied).
- *
- * Return: Success: 0
- *
- * Failure: -1
- *
- * Programmer: Robb Matzke
- * Tuesday, August 10, 1999
- *
- * Modifications:
- *
- *-------------------------------------------------------------------------
- */
-herr_t
-H5Pset_dxpl_multi(hid_t dxpl_id, const hid_t *memb_dxpl)
-{
- H5FD_multi_dxpl_t dx;
- H5FD_mem_t mt;
- htri_t prop_exists; /* Whether the multi VFD DXPL property already exists */
- static const char *func = "H5FDset_dxpl_multi"; /* Function Name for error reporting */
-
- /*NO TRACE*/
-
- /* Clear the error stack */
- H5Eclear2(H5E_DEFAULT);
-
- /* Check arguments */
- if(TRUE != H5Pisa_class(dxpl_id, H5P_DATASET_XFER))
- H5Epush_ret(func, H5E_ERR_CLS, H5E_PLIST, H5E_BADTYPE, "not a data transfer property list", -1)
- if(!memb_dxpl)
- H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "invalid pointer", -1)
- for(mt = H5FD_MEM_DEFAULT; mt < H5FD_MEM_NTYPES; mt = (H5FD_mem_t)(mt + 1)) {
- if(memb_dxpl[mt] != H5P_DEFAULT && TRUE != H5Pisa_class(memb_dxpl[mt], H5P_DATASET_XFER))
- H5Epush_ret(func, H5E_ERR_CLS, H5E_PLIST, H5E_BADTYPE, "not a data transfer property list", -1)
- } /* end for */
-
- /* Check for existence of multi VFD DXPL property in DXPL */
- if((prop_exists = H5Pexist(dxpl_id, H5FD_MULTI_DXPL_PROP_NAME)) < 0)
- H5Epush_ret(func, H5E_ERR_CLS, H5E_PLIST, H5E_CANTGET, "can't check for multi VFD property", -1)
-
- /* Copy the DXPLs to internal property, converting "generic" default
- * property lists into default dataset transfer property lists */
- for(mt = H5FD_MEM_DEFAULT; mt < H5FD_MEM_NTYPES; mt = (H5FD_mem_t)(mt + 1)) {
- if(memb_dxpl[mt] == H5P_DEFAULT)
- dx.memb_dxpl[mt] = H5P_DATASET_XFER_DEFAULT;
- else {
- if((dx.memb_dxpl[mt] = H5Pcopy(memb_dxpl[mt])) < 0)
- H5Epush_ret(func, H5E_ERR_CLS, H5E_PLIST, H5E_CANTCOPY, "can't copy dataset transfer property list", -1)
- } /* end else */
- } /* end for */
-
- /* Clear previous property, if it exists */
- if(prop_exists) {
- H5FD_multi_dxpl_t old_dx;
-
- /* Get the old DXPL value */
- if(H5Pget(dxpl_id, H5FD_MULTI_DXPL_PROP_NAME, &old_dx) < 0)
- H5Epush_ret(func, H5E_ERR_CLS, H5E_PLIST, H5E_CANTGET, "can't get previous property value", -1)
-
- ALL_MEMBERS(mt) {
- if(old_dx.memb_dxpl[mt] >= 0)
- if(H5Pclose(old_dx.memb_dxpl[mt]) < 0)
- H5Epush_ret(func, H5E_ERR_CLS, H5E_PLIST, H5E_CANTCLOSEOBJ, "can't close property list", -1)
- } END_MEMBERS;
-
- /* Set the new value */
- if(H5Pset(dxpl_id, H5FD_MULTI_DXPL_PROP_NAME, &dx) < 0)
- H5Epush_ret(func, H5E_ERR_CLS, H5E_PLIST, H5E_CANTGET, "can't get previous property value", -1)
- } /* end if */
- else {
- /* Insert multi VFD DXPL property into property list */
- if(H5Pinsert2(dxpl_id, H5FD_MULTI_DXPL_PROP_NAME, H5FD_MULTI_DXPL_PROP_SIZE, &dx, NULL, NULL, NULL, H5FD_multi_dxpl_copy_cb, H5FD_multi_dxpl_cmp_cb, H5FD_multi_dxpl_cls_cb) < 0)
- H5Epush_ret(func, H5E_ERR_CLS, H5E_PLIST, H5E_CANTINSERT, "can't insert multi VFD DXPL property", -1)
- } /* end else */
-
- return 0;
-} /* end H5Pset_dxpl_multi() */
-
-
-/*-------------------------------------------------------------------------
- * Function: H5Pget_dxpl_multi
- *
- * Purpose: Returns information which was set with H5Pset_dxpl_multi()
- * above.
- *
- * Return: Success: 0
- *
- * Failure: -1
- *
- * Programmer: Robb Matzke
- * Tuesday, August 10, 1999
- *
- * Modifications:
- *
- *-------------------------------------------------------------------------
- */
-herr_t
-H5Pget_dxpl_multi(hid_t dxpl_id, hid_t *memb_dxpl/*out*/)
-{
- H5FD_multi_dxpl_t dx;
- H5FD_mem_t mt;
- htri_t prop_exists; /* Whether the multi VFD DXPL property already exists */
- static const char *func = "H5FDget_dxpl_multi"; /* Function Name for error reporting */
-
- /*NO TRACE*/
-
- /* Clear the error stack */
- H5Eclear2(H5E_DEFAULT);
-
- /* Argument checking */
- if(TRUE != H5Pisa_class(dxpl_id, H5P_DATASET_XFER))
- H5Epush_ret(func, H5E_ERR_CLS, H5E_PLIST, H5E_BADTYPE, "not a file access property list", -1)
-
- if(memb_dxpl) {
- /* Check for existence of multi VFD DXPL property in DXPL */
- if((prop_exists = H5Pexist(dxpl_id, H5FD_MULTI_DXPL_PROP_NAME)) < 0)
- H5Epush_ret(func, H5E_ERR_CLS, H5E_PLIST, H5E_CANTGET, "can't check for multi VFD property", -1)
- if(!prop_exists)
- H5Epush_ret(func, H5E_ERR_CLS, H5E_PLIST, H5E_CANTGET, "multi VFD DXPL property not set", -1)
-
- /* Get the DXPL value */
- if(H5Pget(dxpl_id, H5FD_MULTI_DXPL_PROP_NAME, &dx) < 0)
- H5Epush_ret(func, H5E_ERR_CLS, H5E_PLIST, H5E_CANTGET, "can't get property value", -1)
-
- /* Deep copy the multi VFD DXPL value */
- for(mt = H5FD_MEM_DEFAULT; mt < H5FD_MEM_NTYPES; mt = (H5FD_mem_t)(mt + 1)) {
- if(dx.memb_dxpl[mt] >= 0)
- memb_dxpl[mt] = H5Pcopy(dx.memb_dxpl[mt]);
- else
- memb_dxpl[mt] = dx.memb_dxpl[mt]; /*default or bad ID */
- } /* end for */
- } /* end if */
-
- return 0;
-} /* end H5Pget_dxpl_multi() */
-
/*-------------------------------------------------------------------------
* Function: H5FD_multi_sb_size
diff --git a/src/H5FDmulti.h b/src/H5FDmulti.h
index da16b0c..e819e74 100644
--- a/src/H5FDmulti.h
+++ b/src/H5FDmulti.h
@@ -34,9 +34,6 @@ H5_DLL herr_t H5Pset_fapl_multi(hid_t fapl_id, const H5FD_mem_t *memb_map,
H5_DLL herr_t H5Pget_fapl_multi(hid_t fapl_id, H5FD_mem_t *memb_map/*out*/,
hid_t *memb_fapl/*out*/, char **memb_name/*out*/,
haddr_t *memb_addr/*out*/, hbool_t *relax/*out*/);
-H5_DLL herr_t H5Pset_dxpl_multi(hid_t dxpl_id, const hid_t *memb_dxpl);
-H5_DLL herr_t H5Pget_dxpl_multi(hid_t dxpl_id, hid_t *memb_dxpl/*out*/);
-
H5_DLL herr_t H5Pset_fapl_split(hid_t fapl, const char *meta_ext,
hid_t meta_plist_id, const char *raw_ext,
hid_t raw_plist_id);
diff --git a/src/H5Tconv.c b/src/H5Tconv.c
index 5ecf864..b732817 100644
--- a/src/H5Tconv.c
+++ b/src/H5Tconv.c
@@ -3014,17 +3014,17 @@ H5T__conv_vlen(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
{
H5T_vlen_alloc_info_t _vl_alloc_info; /* VL allocation info buffer */
H5T_vlen_alloc_info_t *vl_alloc_info = &_vl_alloc_info; /* VL allocation info */
- H5T_path_t *tpath; /* Type conversion path */
+ H5T_path_t *tpath = NULL; /* Type conversion path */
hbool_t noop_conv = FALSE; /* Flag to indicate a noop conversion */
hbool_t write_to_file = FALSE; /* Flag to indicate writing to file */
hbool_t parent_is_vlen; /* Flag to indicate parent is vlen datatyp */
hid_t tsrc_id = -1, tdst_id = -1;/*temporary type atoms */
- H5T_t *src; /*source datatype */
- H5T_t *dst; /*destination datatype */
+ H5T_t *src = NULL; /*source datatype */
+ H5T_t *dst = NULL; /*destination datatype */
H5HG_t bg_hobjid, parent_hobjid;
- uint8_t *s; /*source buffer */
- uint8_t *d; /*destination buffer */
- uint8_t *b; /*background buffer */
+ uint8_t *s = NULL; /*source buffer */
+ uint8_t *d = NULL; /*destination buffer */
+ uint8_t *b = NULL; /*background buffer */
ssize_t s_stride, d_stride; /*src and dst strides */
ssize_t b_stride; /*bkg stride */
size_t safe; /*how many elements are safe to process in each pass */
@@ -3120,7 +3120,7 @@ H5T__conv_vlen(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
if(tpath->cdata.need_bkg || parent_is_vlen) {
/* Set up initial background buffer */
tmp_buf_size = MAX(src_base_size, dst_base_size);
- if(NULL == (tmp_buf = H5FL_BLK_MALLOC(vlen_seq,tmp_buf_size)))
+ if(NULL == (tmp_buf = H5FL_BLK_CALLOC(vlen_seq,tmp_buf_size)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for type conversion")
} /* end if */
@@ -3200,7 +3200,7 @@ H5T__conv_vlen(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
*/
if(!seq_len && !conv_buf) {
conv_buf_size = ((1 / H5T_VLEN_MIN_CONF_BUF_SIZE) + 1) * H5T_VLEN_MIN_CONF_BUF_SIZE;
- if(NULL == (conv_buf = H5FL_BLK_MALLOC(vlen_seq, conv_buf_size)))
+ if(NULL == (conv_buf = H5FL_BLK_CALLOC(vlen_seq, conv_buf_size)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for type conversion")
}
else if(conv_buf_size < MAX(src_size, dst_size)) {
@@ -3208,6 +3208,7 @@ H5T__conv_vlen(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
conv_buf_size = ((MAX(src_size, dst_size) / H5T_VLEN_MIN_CONF_BUF_SIZE) + 1) * H5T_VLEN_MIN_CONF_BUF_SIZE;
if(NULL == (conv_buf = H5FL_BLK_REALLOC(vlen_seq, conv_buf, conv_buf_size)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for type conversion")
+ HDmemset(conv_buf, 0, conv_buf_size);
} /* end if */
/* Read in VL sequence */
@@ -3223,6 +3224,7 @@ H5T__conv_vlen(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
tmp_buf_size = conv_buf_size;
if(NULL == (tmp_buf = H5FL_BLK_REALLOC(vlen_seq, tmp_buf, tmp_buf_size)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for type conversion")
+ HDmemset(tmp_buf, 0, tmp_buf_size);
} /* end if */
/* If we are writing and there is a nested VL type, read
@@ -3236,6 +3238,7 @@ H5T__conv_vlen(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
tmp_buf_size = (bg_seq_len * MAX(src_base_size, dst_base_size));
if(NULL == (tmp_buf = H5FL_BLK_REALLOC(vlen_seq, tmp_buf, tmp_buf_size)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for type conversion")
+ HDmemset(tmp_buf, 0, tmp_buf_size);
} /* end if */
H5F_addr_decode(dst->shared->u.vlen.f, (const uint8_t **)&tmp, &(bg_hobjid.addr));
INT32DECODE(tmp, bg_hobjid.idx);
diff --git a/src/H5public.h b/src/H5public.h
index f66508d..deb4587 100644
--- a/src/H5public.h
+++ b/src/H5public.h
@@ -75,10 +75,10 @@ extern "C" {
/* Version numbers */
#define H5_VERS_MAJOR 1 /* For major interface/format changes */
#define H5_VERS_MINOR 9 /* For minor interface/format changes */
-#define H5_VERS_RELEASE 148 /* For tweaks, bug-fixes, or development */
+#define H5_VERS_RELEASE 149 /* For tweaks, bug-fixes, or development */
#define H5_VERS_SUBRELEASE "" /* For pre-releases like snap0 */
/* Empty string for real releases. */
-#define H5_VERS_INFO "HDF5 library version: 1.9.148" /* Full version string */
+#define H5_VERS_INFO "HDF5 library version: 1.9.149" /* Full version string */
#define H5check() H5check_version(H5_VERS_MAJOR,H5_VERS_MINOR, \
H5_VERS_RELEASE)
diff --git a/src/Makefile.in b/src/Makefile.in
index 3c9098f..f280987 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -522,7 +522,7 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog
# Add libtool shared library version numbers to the HDF5 library
# See libtool versioning documentation online.
LT_VERS_INTERFACE = 6
-LT_VERS_REVISION = 138
+LT_VERS_REVISION = 139
LT_VERS_AGE = 0
H5detect_CFLAGS = -g $(AM_CFLAGS)