summaryrefslogtreecommitdiffstats
path: root/src/H5Fprivate.h
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2002-01-23 21:30:34 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2002-01-23 21:30:34 (GMT)
commit406492e3d24382735c4963e65ef0ce6911a1b78b (patch)
treefd86ee9825a131f6c382aa3ffe8513a328c02e8c /src/H5Fprivate.h
parent9627cb625db48ace93542ec136cfa85a28d1448e (diff)
downloadhdf5-406492e3d24382735c4963e65ef0ce6911a1b78b.zip
hdf5-406492e3d24382735c4963e65ef0ce6911a1b78b.tar.gz
hdf5-406492e3d24382735c4963e65ef0ce6911a1b78b.tar.bz2
[svn-r4853] Purpose:
Bug Fix Description: When file space was returned to the file space free-list for reuse, occasionally raw data allocations which used space from the free-list would overlap with the metadata accumulator and get over-written with the cached information in the accumulator, corrupting the data. Solution: Check if the space about to be recycled on the free-list is going to be used for raw data and also overlaps with the metadata accumulator cache, avoiding using space that fits those criteria. This fixes bug #701 Platforms tested: FreeBSD 4.5 (sleipnir)
Diffstat (limited to 'src/H5Fprivate.h')
-rw-r--r--src/H5Fprivate.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/H5Fprivate.h b/src/H5Fprivate.h
index 09731f2..6a2dfed 100644
--- a/src/H5Fprivate.h
+++ b/src/H5Fprivate.h
@@ -169,6 +169,8 @@ typedef struct H5F_t H5F_t;
#define H5F_addr_cmp(X,Y) (H5F_addr_eq(X,Y)?0: \
(H5F_addr_lt(X, Y)?-1:1))
#define H5F_addr_pow2(N) ((haddr_t)1<<(N))
+#define H5F_addr_overlap(O1,L1,O2,L2) ((O1<O2 && (O1+L1)>O2) || \
+ (O1>=O2 && O1<(O2+L2)))
/* size of size_t and off_t as they exist on disk */
#ifdef H5F_PACKAGE