summaryrefslogtreecommitdiffstats
path: root/src/H5Oefl.c
diff options
context:
space:
mode:
authorRobb Matzke <matzke@llnl.gov>1999-10-15 14:53:57 (GMT)
committerRobb Matzke <matzke@llnl.gov>1999-10-15 14:53:57 (GMT)
commit34e44e399edd8903f8104f8a6b74e96151150b16 (patch)
treef2cc428e6292eb4d60646b4e8f47e71f5cec29d8 /src/H5Oefl.c
parent5246411f704970a2f6568dc7aaf9e7b5b7269505 (diff)
downloadhdf5-34e44e399edd8903f8104f8a6b74e96151150b16.zip
hdf5-34e44e399edd8903f8104f8a6b74e96151150b16.tar.gz
hdf5-34e44e399edd8903f8104f8a6b74e96151150b16.tar.bz2
[svn-r1753] Changes since 19991007
---------------------- ./configure.in ./src/H5config.h.in [REGENERATED] The /usr/ncsa/{include,lib} directories are only added if they actually exist. This fixes a warning on some systems. Checks for the <pdb.h> header file and also for either the PDB or Silo library, and if found prepares to compile the pdb2hdf program. ./config/distdep Relative path names for include files are changed to base names since the makefile contains the logic for searching and since it's likely that building the .distdep files happed from a location other than where they would be used in the file system. ./config/conclude.in Fixed shell errors when `for' loops iterate over nothing for the `uninstall' target. ./src/H5D.c ./src/H5Oefl.c File names for the external files are added to the heap when the dataset is created instead of when the object header is written. This fixes a rare infinite recursion bug. ./src/H5FD.c ./src/H5FDpublic.h Optimization to the free list causes H5FD_alloc() usage to go from >10 seconds to <0.4 second for one example (converting a 30MB equation of state file from PDB to HDF5 format). The optimization is to simply keep track of the largest item in the free list and not search the free list when the largest item is not big enough to satisfy the request. ./src/H5FDcore.c ./src/H5FDcore.h ./test/h5test.c If the `backing_store' property is true then a flush causes the entire contents of memory to be written to the specified file. This is in preparation for the ASCI/red optimizations and is currently tested by the pdb2hdf `--cached' switch. ./src/H5Odtypes.c Wrapped three long lines. ./tools/Makefile.in ./tools/pdb2hdf.c [NEW] A PDB-to-HDF5 translator. It only translates meta data -- the resulting HDF5 points into the PDB file for the raw data.
Diffstat (limited to 'src/H5Oefl.c')
-rw-r--r--src/H5Oefl.c23
1 files changed, 8 insertions, 15 deletions
diff --git a/src/H5Oefl.c b/src/H5Oefl.c
index c14203b..8030005 100644
--- a/src/H5Oefl.c
+++ b/src/H5Oefl.c
@@ -144,6 +144,11 @@ H5O_efl_decode(H5F_t *f, const uint8_t *p, H5O_shared_t UNUSED *sh)
* Modifications:
* Robb Matzke, 1998-07-20
* Rearranged the message to add a version number near the beginning.
+ *
+ * Robb Matzke, 1999-10-14
+ * Entering the name into the local heap happens when the dataset is
+ * created. Otherwise we could end up in infinite recursion if the heap
+ * happens to hash to the same cache slot as the object header.
*
*-------------------------------------------------------------------------
*/
@@ -152,8 +157,6 @@ H5O_efl_encode(H5F_t *f, uint8_t *p, const void *_mesg)
{
const H5O_efl_t *mesg = (const H5O_efl_t *)_mesg;
int i;
- size_t offset;
-
FUNC_ENTER(H5O_efl_encode, FAIL);
@@ -183,20 +186,10 @@ H5O_efl_encode(H5F_t *f, uint8_t *p, const void *_mesg)
/* Encode file list */
for (i=0; i<mesg->nused; i++) {
/*
- * If the name has not been added to the heap yet then do so now.
+ * The name should have been added to the heap when the dataset was
+ * created.
*/
- if (0==mesg->slot[i].name_offset) {
- offset = H5HL_insert (f, mesg->heap_addr,
- HDstrlen (mesg->slot[i].name)+1,
- mesg->slot[i].name);
- if ((size_t)(-1)==offset) {
- HRETURN_ERROR (H5E_EFL, H5E_CANTINIT, FAIL,
- "unable to insert URL into name heap");
- }
- mesg->slot[i].name_offset = offset;
- }
-
- /* Encode the file info */
+ assert(mesg->slot[i].name_offset);
H5F_encode_length (f, p, mesg->slot[i].name_offset);
H5F_encode_length (f, p, mesg->slot[i].offset);
H5F_encode_length (f, p, mesg->slot[i].size);