diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2007-05-14 20:24:08 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2007-05-14 20:24:08 (GMT) |
commit | 31ff357f3190a869147378a9a136510be2caafd7 (patch) | |
tree | 5220b17a8e4b6c434b799108719a1dc15d6c0326 /src/H5O.c | |
parent | 1726061075e9adc99ac2286fb542438acc79c4ab (diff) | |
download | hdf5-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/H5O.c')
-rw-r--r-- | src/H5O.c | 37 |
1 files changed, 33 insertions, 4 deletions
@@ -1444,7 +1444,7 @@ H5O_delete_oh(H5F_t *f, hid_t dxpl_id, H5O_t *oh) */ for(u = 0, curr_msg = &oh->mesg[0]; u < oh->nmesgs; u++, curr_msg++) { /* Free any space referred to in the file from this message */ - if(H5O_delete_mesg(f, dxpl_id, curr_msg) < 0) + if(H5O_delete_mesg(f, dxpl_id, oh, curr_msg) < 0) HGOTO_ERROR(H5E_OHDR, H5E_CANTDELETE, FAIL, "unable to delete file space for object header message") } /* end for */ @@ -1761,11 +1761,10 @@ H5O_loc_hold_file(H5O_loc_t *loc) HDassert(loc->file); /* If this location is not already holding its file open, do so. */ - if(!loc->holding_file) - { + if(!loc->holding_file) { loc->file->nopen_objs++; loc->holding_file = TRUE; - } + } /* end if */ FUNC_LEAVE_NOAPI(SUCCEED) } /* end H5O_loc_hold_file() */ @@ -2088,3 +2087,33 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5O_obj_create() */ + +/*------------------------------------------------------------------------- + * Function: H5O_get_oh_addr + * + * Purpose: Retrieve the address of the object header + * + * Note: This routine participates in the "Inlining C struct access" + * pattern, don't call it directly, use the appropriate macro + * defined in H5Oprivate.h. + * + * Return: Success: Valid haddr_t + * Failure: HADDR_UNDEF + * + * Programmer: Quincey Koziol + * March 15 2007 + * + *------------------------------------------------------------------------- + */ +haddr_t +H5O_get_oh_addr(const H5O_t *oh) +{ + /* Use FUNC_ENTER_NOAPI_NOINIT_NOFUNC here to avoid performance issues */ + FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_get_oh_addr) + + HDassert(oh); + HDassert(oh->chunk); + + FUNC_LEAVE_NOAPI(oh->chunk[0].addr) +} /* end H5O_get_oh_addr() */ + |