summaryrefslogtreecommitdiffstats
path: root/src/H5SMpkg.h
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2009-11-14 04:48:37 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2009-11-14 04:48:37 (GMT)
commit699a5ddec49aad9ee30201a0d89c902a34c7597f (patch)
tree6bcd02bc6930ca7830826684534c50ad6b40cca3 /src/H5SMpkg.h
parent5084f8a5ebc3200315e95729d09628a800d442a2 (diff)
downloadhdf5-699a5ddec49aad9ee30201a0d89c902a34c7597f.zip
hdf5-699a5ddec49aad9ee30201a0d89c902a34c7597f.tar.gz
hdf5-699a5ddec49aad9ee30201a0d89c902a34c7597f.tar.bz2
[svn-r17891] Description:
Switch the shared object header messages code to use the refactored v2 B-tree routines. (this should be the interface that is using them) Tested on: FreeBSD/32 6.3 (duty) in debug mode FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode Linux/32 2.6 (jam) w/PGI compilers, w/default API=1.8.x, w/C++ & FORTRAN, w/threadsafe, in debug mode Linux/64-amd64 2.6 (smirom) w/Intel compilers, w/default API=1.6.x, w/C++ & FORTRAN, in production mode Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN, w/szip filter, in production mode Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN, in production mode Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in debug mode Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode Mac OS X/32 10.6.2 (amazon) in debug mode Mac OS X/32 10.6.2 (amazon) w/C++ & FORTRAN, w/threadsafe, in production mode
Diffstat (limited to 'src/H5SMpkg.h')
-rwxr-xr-xsrc/H5SMpkg.h30
1 files changed, 15 insertions, 15 deletions
diff --git a/src/H5SMpkg.h b/src/H5SMpkg.h
index dc69b2b..093fb04 100755
--- a/src/H5SMpkg.h
+++ b/src/H5SMpkg.h
@@ -44,42 +44,42 @@
#define H5SM_SIZEOF_CHECKSUM 4
#define H5SM_HEAP_LOC_SIZE ( \
- 4 /* Reference count */ \
+ (unsigned)4 /* Reference count */ \
+ sizeof(H5O_fheap_id_t) /* size of heap ID on disk */ \
)
#define H5SM_OH_LOC_SIZE(f) ( \
- 1 /* reserved (possible flags?) */ \
- + 1 /* message type ID */ \
- + 2 /* creation index of message in OH */ \
+ (unsigned)1 /* reserved (possible flags?) */ \
+ + (unsigned)1 /* message type ID */ \
+ + (unsigned)2 /* creation index of message in OH */ \
+ H5F_SIZEOF_ADDR(f) /* address of OH */ \
)
#define H5SM_SOHM_ENTRY_SIZE(f) ( \
- 1 /* Message location */ \
- + 4 /* Hash value */ \
+ (unsigned)1 /* Message location */ \
+ + (unsigned)4 /* Hash value */ \
+ MAX(H5SM_HEAP_LOC_SIZE, H5SM_OH_LOC_SIZE(f)) /* Entry */ \
)
#define H5SM_TABLE_SIZE(f) ( \
- H5_SIZEOF_MAGIC /* Signature */ \
- + H5SM_SIZEOF_CHECKSUM /* Checksum */ \
+ (unsigned)H5_SIZEOF_MAGIC /* Signature */ \
+ + (unsigned)H5SM_SIZEOF_CHECKSUM /* Checksum */ \
)
#define H5SM_INDEX_HEADER_SIZE(f) ( \
- 1 /* Whether index is a list or B-tree */ \
- + 1 /* Version of index format */ \
- + 2 /* Type of messages stored in the index */ \
- + 4 /* Minimum size of messages to share */ \
- + (3 * 2) /* B-tree cutoff, list cutoff, # of shared messages */ \
+ (unsigned)1 /* Whether index is a list or B-tree */ \
+ + (unsigned)1 /* Version of index format */ \
+ + (unsigned)2 /* Type of messages stored in the index */ \
+ + (unsigned)4 /* Minimum size of messages to share */ \
+ + (unsigned)(3 * 2) /* B-tree cutoff, list cutoff, # of shared messages */ \
+ H5F_SIZEOF_ADDR(f) /* Location of list or B-tree */ \
+ H5F_SIZEOF_ADDR(f) /* Address of heap */ \
)
#define H5SM_LIST_SIZE(f, num_mesg) ( \
- H5_SIZEOF_MAGIC /* Signature */ \
+ (unsigned) H5_SIZEOF_MAGIC /* Signature */ \
+ (H5SM_SOHM_ENTRY_SIZE(f) * num_mesg) /* Message entries */ \
- + H5SM_SIZEOF_CHECKSUM /* Checksum */ \
+ + (unsigned)H5SM_SIZEOF_CHECKSUM /* Checksum */ \
)
#define H5SM_B2_NODE_SIZE 512