summaryrefslogtreecommitdiffstats
path: root/src/H5Osdspace.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2007-05-14 20:24:08 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2007-05-14 20:24:08 (GMT)
commit31ff357f3190a869147378a9a136510be2caafd7 (patch)
tree5220b17a8e4b6c434b799108719a1dc15d6c0326 /src/H5Osdspace.c
parent1726061075e9adc99ac2286fb542438acc79c4ab (diff)
downloadhdf5-31ff357f3190a869147378a9a136510be2caafd7.zip
hdf5-31ff357f3190a869147378a9a136510be2caafd7.tar.gz
hdf5-31ff357f3190a869147378a9a136510be2caafd7.tar.bz2
[svn-r13753] Description:
Check in "unique, but sharable" optimization to ISOHM code, which allows object header messages that are only used in one object to remain in the sole user's header, but migrates messages that are used in more than one header into the ISOHM heap. Tested on: Mac OS X/32 10.4.9 (amazon) FreeBSD/32 6.2 (duty) Linux/32 2.6 (chicago) Linux/64 2.6 (chicago2)
Diffstat (limited to 'src/H5Osdspace.c')
-rw-r--r--src/H5Osdspace.c19
1 files changed, 7 insertions, 12 deletions
diff --git a/src/H5Osdspace.c b/src/H5Osdspace.c
index 124a7de..348f894 100644
--- a/src/H5Osdspace.c
+++ b/src/H5Osdspace.c
@@ -60,7 +60,7 @@ const H5O_msg_class_t H5O_MSG_SDSPACE[1] = {{
H5O_SDSPACE_ID, /* message id number */
"dataspace", /* message name for debugging */
sizeof(H5S_extent_t), /* native message size */
- TRUE, /* messages are sharable? */
+ H5O_SHARE_IS_SHARABLE|H5O_SHARE_IN_OHDR, /* messages are sharable? */
H5O_sdspace_shared_decode, /* decode message */
H5O_sdspace_shared_encode, /* encode message */
H5O_sdspace_copy, /* copy the native value */
@@ -69,7 +69,7 @@ const H5O_msg_class_t H5O_MSG_SDSPACE[1] = {{
H5O_sdspace_free, /* free method */
H5O_sdspace_shared_delete, /* file delete method */
H5O_sdspace_shared_link, /* link method */
- H5O_shared_copy, /* set share method */
+ NULL, /* set share method */
NULL, /*can share method */
H5O_sdspace_pre_copy_file, /* pre copy native value to file */
H5O_sdspace_shared_copy_file,/* copy native value to file */
@@ -316,11 +316,6 @@ H5O_sdspace_encode(H5F_t *f, uint8_t *p, const void *_mesg)
DESCRIPTION
This function copies a native (memory) simple dimensionality message,
allocating the destination structure if necessary.
- MODIFICATIONS
- Raymond Lu
- April 8, 2004
- Changed operation on H5S_simple_t to H5S_extent_t.
-
--------------------------------------------------------------------------*/
static void *
H5O_sdspace_copy(const void *mesg, void *dest)
@@ -332,20 +327,20 @@ H5O_sdspace_copy(const void *mesg, void *dest)
FUNC_ENTER_NOAPI_NOINIT(H5O_sdspace_copy)
/* check args */
- assert(src);
- if (!dst && NULL==(dst = H5FL_MALLOC(H5S_extent_t)))
+ HDassert(src);
+ if(!dst && NULL == (dst = H5FL_MALLOC(H5S_extent_t)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
/* Copy extent information */
- if(H5S_extent_copy(dst,src)<0)
+ if(H5S_extent_copy(dst, src) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOPY, NULL, "can't copy extent")
/* Set return value */
- ret_value=dst;
+ ret_value = dst;
done:
FUNC_LEAVE_NOAPI(ret_value)
-}
+} /* end H5O_sdspace_copy() */
/*--------------------------------------------------------------------------