summaryrefslogtreecommitdiffstats
path: root/src/H5F.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2004-07-07 21:23:45 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2004-07-07 21:23:45 (GMT)
commit585d31b7cb6cacfec86f68fc3dd66c0e67aafbd8 (patch)
treec2eb9866df550efc0fdba768889f9faacc0257f4 /src/H5F.c
parentf73369b20c84fcab5de56cf3224ae3dd9c638912 (diff)
downloadhdf5-585d31b7cb6cacfec86f68fc3dd66c0e67aafbd8.zip
hdf5-585d31b7cb6cacfec86f68fc3dd66c0e67aafbd8.tar.gz
hdf5-585d31b7cb6cacfec86f68fc3dd66c0e67aafbd8.tar.bz2
[svn-r8823] 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.c40
1 files changed, 40 insertions, 0 deletions
diff --git a/src/H5F.c b/src/H5F.c
index 1755e5d..86f9019 100644
--- a/src/H5F.c
+++ b/src/H5F.c
@@ -1490,6 +1490,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++;
@@ -1576,6 +1580,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))
@@ -4464,6 +4472,38 @@ done:
/*-------------------------------------------------------------------------
+ * 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: H5F_block_read
*
* Purpose: Reads some data from a file/server/etc into a buffer.