summaryrefslogtreecommitdiffstats
path: root/src/H5Tconv.c
diff options
context:
space:
mode:
authorJames Laird <jlaird@hdfgroup.org>2004-07-14 19:34:24 (GMT)
committerJames Laird <jlaird@hdfgroup.org>2004-07-14 19:34:24 (GMT)
commita0c466cd99e6d62725ac1828755b042c2dcb6c85 (patch)
tree8ef8956600e8765fe9a0fc96dcb5faa0798032e8 /src/H5Tconv.c
parent769ee96c1fd7cdcc4de2f2b1f36e943ebf9fff8b (diff)
downloadhdf5-a0c466cd99e6d62725ac1828755b042c2dcb6c85.zip
hdf5-a0c466cd99e6d62725ac1828755b042c2dcb6c85.tar.gz
hdf5-a0c466cd99e6d62725ac1828755b042c2dcb6c85.tar.bz2
[svn-r8877]
Purpose: Bug Fix Description: If an HDF5 file grows larger than its address space, it dies and is unable to write any data. This is more likely to happen since users are able to change the number of bytes used to store addresses in the file. Solution: HDF5 now throws an error instead of dying. In addition, it "reserves" address space for the local heap and for object headers (which do not allocate space immediately). This ensures that after the error occurs, there is enough address space left to flush the entire file to disk, so no data is lost. A more complete explanation is at /doc/html/TechNotes/ReservedFileSpace.html Platforms tested: sleipnir, copper (parallel), verbena, arabica, Windows (Visual Studio 7) Solution: Platforms tested: Misc. update:
Diffstat (limited to 'src/H5Tconv.c')
-rw-r--r--src/H5Tconv.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/H5Tconv.c b/src/H5Tconv.c
index 82c7084..698c99f 100644
--- a/src/H5Tconv.c
+++ b/src/H5Tconv.c
@@ -2685,10 +2685,6 @@ H5T_conv_vlen(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
nelmts-=safe;
} /* end while */
- /* Reset the conversion buffer pointer, so it doesn't get freed */
- if(write_to_file && noop_conv)
- conv_buf=NULL;
-
/* Release the temporary datatype IDs used */
if (tsrc_id >= 0)
H5I_dec_ref(tsrc_id);
@@ -2701,6 +2697,9 @@ H5T_conv_vlen(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
} /* end switch */
done:
+ /* If the conversion buffer doesn't need to be freed, reset its pointer */
+ if(write_to_file && noop_conv)
+ conv_buf=NULL;
/* Release the conversion buffer (always allocated, except on errors) */
if(conv_buf!=NULL)
H5FL_BLK_FREE(vlen_seq,conv_buf);