diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2004-07-09 02:06:32 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2004-07-09 02:06:32 (GMT) |
commit | 6beaf50c8fc861e99b46500b4dc7f606e8f72ffb (patch) | |
tree | f718fce63e96ad19d5cb8aea628a4c4755918aa0 /src/H5F.c | |
parent | 9437a2686563bda04c9dda9e6c09bb527fe63dd0 (diff) | |
download | hdf5-6beaf50c8fc861e99b46500b4dc7f606e8f72ffb.zip hdf5-6beaf50c8fc861e99b46500b4dc7f606e8f72ffb.tar.gz hdf5-6beaf50c8fc861e99b46500b4dc7f606e8f72ffb.tar.bz2 |
[svn-r8846] Purpose:
Bug fix
Description:
The "shared" raw B-tree node can get freed before all the B-tree nodes
had been flushed out to disk and released by the cache.
Solution:
Implement a simple reference counting wrapper for objects in the library
and use it to hold the shared raw B-tree nodes so they aren't freed before all
references to them in memory are released.
Platforms tested:
Solaris 2.7 (arabica)
FreeBSD 4.10 (sleipnir)
IRIX64 6.5 (modei4)
Diffstat (limited to 'src/H5F.c')
-rw-r--r-- | src/H5F.c | 14 |
1 files changed, 5 insertions, 9 deletions
@@ -1554,10 +1554,6 @@ H5F_new(H5F_file_t *shared, hid_t fcpl_id, hid_t fapl_id) /* Create the file's "open object" information */ if(H5FO_create(f)<0) HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, NULL, "unable to create open object TBBT") - - /* Create information needed for group nodes */ - if(H5G_node_init(f)<0) - HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, NULL, "unable to create group node info") } /* end else */ f->shared->nrefs++; @@ -4671,7 +4667,7 @@ done: /*------------------------------------------------------------------------- - * Function: H5F_raw_page + * Function: H5F_rc_page * * Purpose: Replaced a macro to retrieve the raw B-tree page value * now that the generic properties are being used to store @@ -4690,15 +4686,15 @@ done: * *------------------------------------------------------------------------- */ -void *H5F_raw_page(const H5F_t *f) +H5RC_t *H5F_rc_page(const H5F_t *f) { /* Use FUNC_ENTER_NOAPI_NOINIT_NOFUNC here to avoid performance issues */ - FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5F_raw_page) + FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5F_rc_page) assert(f); assert(f->shared); - FUNC_LEAVE_NOAPI(f->shared->raw_page) + FUNC_LEAVE_NOAPI(f->shared->rc_page) } /* end H5F_raw_page() */ @@ -4709,7 +4705,7 @@ void *H5F_raw_page(const H5F_t *f) * is called after an existing file is opened in order * to learn the true size of the underlying file. * - * Return: Success: File size + * Return: Success: Non-negative * Failure: Negative * * Programmer: David Pitt |