diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2004-07-07 21:25:33 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2004-07-07 21:25:33 (GMT) |
commit | 8d7e8124f1d90afae3262cf8742e2b90cf96251b (patch) | |
tree | 772318ce46046065aa2d2590c96c73218a7f28bd /src/H5F.c | |
parent | 2afbcb2f0e536dfdd00c405278154ea4464d866b (diff) | |
download | hdf5-8d7e8124f1d90afae3262cf8742e2b90cf96251b.zip hdf5-8d7e8124f1d90afae3262cf8742e2b90cf96251b.tar.gz hdf5-8d7e8124f1d90afae3262cf8742e2b90cf96251b.tar.bz2 |
[svn-r8824] Purpose:
Code optimization
Description:
Since the raw B-tree nodes are the same size and only used when reading in
or writing out a B-tree node, move raw B-tree node buffer from being per node
to a single node that is shared among all B-tree nodes of a particular tree,
freeing up a lot of space and eliminating lots of memory copies, etc.
Platforms tested:
Solaris 2.7 (arabica)
FreeBSD 4.10 (sleipnir) w/parallel
Too minor to require h5committest
Diffstat (limited to 'src/H5F.c')
-rw-r--r-- | src/H5F.c | 41 |
1 files changed, 41 insertions, 0 deletions
@@ -1554,6 +1554,10 @@ 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++; @@ -1640,6 +1644,10 @@ H5F_dest(H5F_t *f, hid_t dxpl_id) ret_value = FAIL; /*but keep going*/ } /* end if */ f->shared->cwfs = H5MM_xfree (f->shared->cwfs); + if (H5G_node_close(f)<0) { + HERROR(H5E_FILE, H5E_CANTRELEASE, "problems closing file"); + ret_value = FAIL; /*but keep going*/ + } /* end if */ /* Destroy file creation properties */ if(H5I_GENPROP_LST != H5I_get_type(f->shared->fcpl_id)) @@ -4660,6 +4668,39 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5F_mpi_get_comm() */ #endif /* H5_HAVE_PARALLEL */ + + +/*------------------------------------------------------------------------- + * Function: H5F_raw_page + * + * Purpose: Replaced a macro to retrieve the raw B-tree page value + * now that the generic properties are being used to store + * the values. + * + * Return: Success: Non-void, and the raw B-tree page value + * is returned. + * + * Failure: void (should not happen) + * + * Programmer: Quincey Koziol + * koziol@ncsa.uiuc.edu + * Jul 5 2004 + * + * Modifications: + * + *------------------------------------------------------------------------- + */ +void *H5F_raw_page(const H5F_t *f) +{ + /* Use FUNC_ENTER_NOAPI_NOINIT_NOFUNC here to avoid performance issues */ + FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5F_raw_page) + + assert(f); + assert(f->shared); + + FUNC_LEAVE_NOAPI(f->shared->raw_page) +} /* end H5F_raw_page() */ + /*------------------------------------------------------------------------- * Function: H5Fget_filesize |