summaryrefslogtreecommitdiffstats
path: root/src/H5Ocache.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2007-03-06 18:54:24 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2007-03-06 18:54:24 (GMT)
commit492df7a33ca592cfd24a4ec31cda12b887df3241 (patch)
tree23fe295d0ed1a9141e591e18d04ee0b3ccb246cc /src/H5Ocache.c
parentf25328a15af33de7f804728776ec407ca4393b25 (diff)
downloadhdf5-492df7a33ca592cfd24a4ec31cda12b887df3241.zip
hdf5-492df7a33ca592cfd24a4ec31cda12b887df3241.tar.gz
hdf5-492df7a33ca592cfd24a4ec31cda12b887df3241.tar.bz2
[svn-r13470] Description:
Avoid storing the phase change values for attribute storage, unless they are non-default values. Tested on: Mac OS X/32 10.4.8 (amazon)
Diffstat (limited to 'src/H5Ocache.c')
-rw-r--r--src/H5Ocache.c18
1 files changed, 13 insertions, 5 deletions
diff --git a/src/H5Ocache.c b/src/H5Ocache.c
index 7d096d5..c4430e6 100644
--- a/src/H5Ocache.c
+++ b/src/H5Ocache.c
@@ -49,7 +49,7 @@
#define H5O_SPEC_READ_SIZE 512
/* All the object header status flags that this version of the library knows about */
-#define H5O_HDR_ALL_FLAGS (H5O_HDR_ATTR_CRT_ORDER_TRACKED | H5O_HDR_ATTR_CRT_ORDER_INDEXED | H5O_HDR_STORE_TIMES)
+#define H5O_HDR_ALL_FLAGS (H5O_HDR_ATTR_CRT_ORDER_TRACKED | H5O_HDR_ATTR_CRT_ORDER_INDEXED | H5O_HDR_ATTR_STORE_PHASE_CHANGE | H5O_HDR_STORE_TIMES)
/******************/
@@ -314,8 +314,14 @@ H5O_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, const void UNUSED * _udata1,
oh->atime = oh->mtime = oh->ctime = oh->btime = 0;
/* Attribute fields */
- UINT16DECODE(p, oh->max_compact);
- UINT16DECODE(p, oh->min_dense);
+ if(oh->flags & H5O_HDR_ATTR_STORE_PHASE_CHANGE) {
+ UINT16DECODE(p, oh->max_compact);
+ UINT16DECODE(p, oh->min_dense);
+ } /* end if */
+ else {
+ oh->max_compact = H5O_CRT_ATTR_MAX_COMPACT_DEF;
+ oh->min_dense = H5O_CRT_ATTR_MIN_DENSE_DEF;
+ } /* end else */
H5F_DECODE_LENGTH(f, p, oh->nattrs);
H5F_addr_decode(f, &p, &(oh->attr_fheap_addr));
H5F_addr_decode(f, &p, &(oh->name_bt2_addr));
@@ -661,8 +667,10 @@ H5O_assert(oh);
} /* end if */
/* Attribute fields */
- UINT16ENCODE(p, oh->max_compact);
- UINT16ENCODE(p, oh->min_dense);
+ if(oh->flags & H5O_HDR_ATTR_STORE_PHASE_CHANGE) {
+ UINT16ENCODE(p, oh->max_compact);
+ UINT16ENCODE(p, oh->min_dense);
+ } /* end if */
H5F_ENCODE_LENGTH(f, p, oh->nattrs);
H5F_addr_encode(f, &p, oh->attr_fheap_addr);
H5F_addr_encode(f, &p, oh->name_bt2_addr);