summaryrefslogtreecommitdiffstats
path: root/src/H5MF.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2009-12-17 15:07:35 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2009-12-17 15:07:35 (GMT)
commit77038a81755bd6c853323ba261c9c671800d7be7 (patch)
tree8c61a206ea1a60c319006aa5dd42604170fa7607 /src/H5MF.c
parent9474f434a37ee313be94b0388af4322ecdace648 (diff)
downloadhdf5-77038a81755bd6c853323ba261c9c671800d7be7.zip
hdf5-77038a81755bd6c853323ba261c9c671800d7be7.tar.gz
hdf5-77038a81755bd6c853323ba261c9c671800d7be7.tar.bz2
[svn-r18030] Description:
Bring "brush clearing" changes (whitespace & style issues, mostly) from metadata_journaling branch to the "merging" branch, to converge the trunk and the metadata_journaling branch. Tested on: FreeBSD/32 6.3 (duty) in debug mode FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode Linux/32 2.6 (jam) w/PGI compilers, w/default API=1.8.x, w/C++ & FORTRAN, w/threadsafe, in debug mode Linux/64-amd64 2.6 (smirom) w/Intel compilers, w/default API=1.6.x, w/C++ & FORTRAN, in production mode Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN, w/szip filter, in production mode Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN, in production mode Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in debug mode Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode Mac OS X/32 10.6.2 (amazon) in debug mode Mac OS X/32 10.6.2 (amazon) w/C++ & FORTRAN, w/threadsafe, in production mode
Diffstat (limited to 'src/H5MF.c')
-rw-r--r--src/H5MF.c52
1 files changed, 3 insertions, 49 deletions
diff --git a/src/H5MF.c b/src/H5MF.c
index b9a5e7f..95d7552 100644
--- a/src/H5MF.c
+++ b/src/H5MF.c
@@ -58,7 +58,6 @@
/********************/
/* Local Prototypes */
/********************/
-static hbool_t H5MF_alloc_overflow(H5F_t *f, hsize_t size);
/*********************/
@@ -94,9 +93,9 @@ static hbool_t H5MF_alloc_overflow(H5F_t *f, hsize_t size);
*-------------------------------------------------------------------------
*/
haddr_t
-H5MF_alloc(H5F_t *f, H5FD_mem_t type, hid_t dxpl_id, hsize_t size)
+H5MF_alloc(const H5F_t *f, H5FD_mem_t type, hid_t dxpl_id, hsize_t size)
{
- haddr_t ret_value;
+ haddr_t ret_value; /* Return value */
FUNC_ENTER_NOAPI(H5MF_alloc, HADDR_UNDEF)
@@ -138,7 +137,7 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5MF_xfree(H5F_t *f, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, hsize_t size)
+H5MF_xfree(const H5F_t *f, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, hsize_t size)
{
herr_t ret_value = SUCCEED; /* Return value */
@@ -221,51 +220,6 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5MF_alloc_overflow
- *
- * Purpose: Checks if an allocation of file space would cause an overflow.
- * F is the file whose space is being allocated, SIZE is the amount
- * of space needed.
- *
- * Return: FALSE if no overflow would result
- * TRUE if overflow would result (the allocation should not be allowed)
- *
- * Programmer: James Laird
- * Nat Furrer
- * Tuesday, June 1, 2004
- *
- *-------------------------------------------------------------------------
- */
-static hbool_t
-H5MF_alloc_overflow(H5F_t *f, hsize_t size)
-{
- haddr_t eoa; /* End-of-allocation in the file */
- haddr_t space_avail; /* Unallocated space still available in file */
- hbool_t ret_value; /* Return value */
-
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5MF_alloc_overflow)
-
- /* Start with the current end of the file's address. */
- eoa = H5F_get_eoa(f);
- HDassert(H5F_addr_defined(eoa));
-
- /* Subtract EOA from the file's maximum address to get the actual amount of
- * addressable space left in the file.
- */
- HDassert(f->shared->maxaddr >= eoa);
- space_avail = (hsize_t)(f->shared->maxaddr - eoa);
-
- /* Ensure that there's enough room left in the file for something of this size */
- if(size > space_avail)
- ret_value = TRUE;
- else
- ret_value = FALSE;
-
- FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5MF_alloc_overflow() */
-
-
-/*-------------------------------------------------------------------------
* Function: H5MF_can_extend
*
* Purpose: Check if a block in the file can be extended.