summaryrefslogtreecommitdiffstats
path: root/src/H5HGprivate.h
diff options
context:
space:
mode:
authorRobb Matzke <matzke@llnl.gov>1998-07-20 13:45:25 (GMT)
committerRobb Matzke <matzke@llnl.gov>1998-07-20 13:45:25 (GMT)
commit365dac33e385affcb57a6b8a5cf53f8d03ac2510 (patch)
treedee1bd85c27ba9de2b2cbc2d958a2e4e2861ed9b /src/H5HGprivate.h
parent79d65106abab53203ad5c6ceda033f65eb2d3099 (diff)
downloadhdf5-365dac33e385affcb57a6b8a5cf53f8d03ac2510.zip
hdf5-365dac33e385affcb57a6b8a5cf53f8d03ac2510.tar.gz
hdf5-365dac33e385affcb57a6b8a5cf53f8d03ac2510.tar.bz2
[svn-r515] Changes since 19980715
---------------------- ./doc/html/H5.format.html ./src/H5Gent.c ./src/H5Gprivate.h ./src/H5Oattr.c ./src/H5Oprivate.h ./src/H5Oshared.c ./src/H5HG.c ./src/H5HGprivate.h Added padding fields in symbol table entries, attribute messages, shared messages, and global heap objects to insure that things are aligned on 8-byte boundaries in the file, and thus in memory. Otherwise some little endian machines complain (DEC Alpha) during encoding/decoding of file meta data. I chose to add alignment to the file rather than rewriting the ENCODE/DECODE macros for the little endian case. Completely rewrote the section on attribute messages. More alignment stuff will follow. ./src/H5detect.c Fixed a typo `nd'->`dn' ./test/dtypes.c Commented out conversion tests to/from `long double' on machines where it's the same size as `double' to get rid of compiler warnings. ./doc/html/Big.html Fixed a couple typos.
Diffstat (limited to 'src/H5HGprivate.h')
-rw-r--r--src/H5HGprivate.h15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/H5HGprivate.h b/src/H5HGprivate.h
index c6ec1cd..8f66ef7 100644
--- a/src/H5HGprivate.h
+++ b/src/H5HGprivate.h
@@ -24,6 +24,16 @@
#define H5HG_VERSION 1
/*
+ * Pad all global heap messages to a multiple of eight bytes so we can load
+ * the entire collection into memory and operate on it there. Eight should
+ * be sufficient for machines that have alignment constraints because our
+ * largest data type is eight bytes.
+ */
+#define H5HG_ALIGNMENT 8
+#define H5HG_ALIGN(X) (H5HG_ALIGNMENT*(((X)+H5HG_ALIGNMENT-1)/ \
+ H5HG_ALIGNMENT))
+
+/*
* All global heap collections are at least this big. This allows us to read
* most collections with a single read() since we don't have to read a few
* bytes of header to figure out the size. If the heap is larger than this
@@ -53,8 +63,9 @@
/*
* The overhead associated with each object in the heap.
*/
-#define H5HG_SIZEOF_OBJHDR(f) (2 + /*reference count */ \
- 2 + /*reserved */ \
+#define H5HG_SIZEOF_OBJHDR(f) (2 + /*object id number */ \
+ 2 + /*reference count */ \
+ 4 + /*reserved */ \
H5F_SIZEOF_SIZE(f)) /*object data size */
/*