summaryrefslogtreecommitdiffstats
path: root/src/H5MFaggr.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2009-08-20 18:45:55 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2009-08-20 18:45:55 (GMT)
commit75faf535a3d4700af1747649ee3d7123055cfad4 (patch)
treeed71b714edb16099ce108092b1b90d1947d92b9e /src/H5MFaggr.c
parent0b3b4351e7841f00cdcda837fc2960a37a923d69 (diff)
downloadhdf5-75faf535a3d4700af1747649ee3d7123055cfad4.zip
hdf5-75faf535a3d4700af1747649ee3d7123055cfad4.tar.gz
hdf5-75faf535a3d4700af1747649ee3d7123055cfad4.tar.bz2
[svn-r17393] Description:
Bring back more changes from the file free space branch to the trunk. 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 (kagiso) w/PGI compilers, 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 production mode Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode Mac OS X/32 10.5.8 (amazon) in debug mode Mac OS X/32 10.5.8 (amazon) w/C++ & FORTRAN, w/threadsafe, in production mode
Diffstat (limited to 'src/H5MFaggr.c')
-rw-r--r--src/H5MFaggr.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/H5MFaggr.c b/src/H5MFaggr.c
index 0b1bc91..89412cd 100644
--- a/src/H5MFaggr.c
+++ b/src/H5MFaggr.c
@@ -227,7 +227,7 @@ HDfprintf(stderr, "%s: aggr = {%a, %Hu, %Hu}\n", FUNC, aggr->addr, aggr->tot_siz
((other_aggr->tot_size - other_aggr->size) >= other_aggr->alloc_size)) {
if(H5FD_free(f->shared->lf, dxpl_id, other_alloc_type, f, other_aggr->addr, other_aggr->size) < 0)
- HGOTO_ERROR(H5E_VFL, H5E_CANTFREE, HADDR_UNDEF, "can't free aggregation block")
+ HGOTO_ERROR(H5E_RESOURCE, H5E_CANTFREE, HADDR_UNDEF, "can't free aggregation block")
other_aggr->addr = 0;
other_aggr->tot_size = 0;
@@ -236,7 +236,7 @@ HDfprintf(stderr, "%s: aggr = {%a, %Hu, %Hu}\n", FUNC, aggr->addr, aggr->tot_siz
/* Allocate space from the VFD (i.e. at the end of the file) */
if(HADDR_UNDEF == (ret_value = H5FD_alloc(f->shared->lf, dxpl_id, type, f, size, &eoa_frag_addr, &eoa_frag_size)))
- HGOTO_ERROR(H5E_VFL, H5E_CANTALLOC, HADDR_UNDEF, "can't allocate aggregation block")
+ HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, HADDR_UNDEF, "can't allocate aggregation block")
} /* end else */
} /* end if */
else {
@@ -271,7 +271,7 @@ HDfprintf(stderr, "%s: Allocating block\n", FUNC);
((other_aggr->tot_size - other_aggr->size) >= other_aggr->alloc_size)) {
if(H5FD_free(f->shared->lf, dxpl_id, other_alloc_type, f, other_aggr->addr, other_aggr->size) < 0)
- HGOTO_ERROR(H5E_VFL, H5E_CANTFREE, HADDR_UNDEF, "can't free aggregation block")
+ HGOTO_ERROR(H5E_RESOURCE, H5E_CANTFREE, HADDR_UNDEF, "can't free aggregation block")
other_aggr->addr = 0;
other_aggr->tot_size = 0;
other_aggr->size = 0;
@@ -279,12 +279,12 @@ HDfprintf(stderr, "%s: Allocating block\n", FUNC);
/* Allocate space from the VFD (i.e. at the end of the file) */
if(HADDR_UNDEF == (new_space = H5FD_alloc(f->shared->lf, dxpl_id, alloc_type, f, aggr->alloc_size, &eoa_frag_addr, &eoa_frag_size)))
- HGOTO_ERROR(H5E_VFL, H5E_CANTALLOC, HADDR_UNDEF, "can't allocate aggregation block")
+ HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, HADDR_UNDEF, "can't allocate aggregation block")
/* Return the unused portion of the block to a free list */
if(aggr->size > 0)
if(H5MF_xfree(f, alloc_type, dxpl_id, aggr->addr, aggr->size) < 0)
- HGOTO_ERROR(H5E_VFL, H5E_CANTFREE, HADDR_UNDEF, "can't free aggregation block")
+ HGOTO_ERROR(H5E_RESOURCE, H5E_CANTFREE, HADDR_UNDEF, "can't free aggregation block")
/* Point the aggregator at the newly allocated block */
aggr->addr = new_space;
@@ -301,12 +301,12 @@ HDfprintf(stderr, "%s: Allocating block\n", FUNC);
/* Freeing any possible fragment due to file allocation */
if(eoa_frag_size)
if(H5MF_xfree(f, type, dxpl_id, eoa_frag_addr, eoa_frag_size) < 0)
- HGOTO_ERROR(H5E_VFL, H5E_CANTFREE, HADDR_UNDEF, "can't free eoa fragment")
+ HGOTO_ERROR(H5E_RESOURCE, H5E_CANTFREE, HADDR_UNDEF, "can't free eoa fragment")
/* Freeing any possible fragment due to alignment in the block after extension */
if(extended && frag_size)
if(H5MF_xfree(f, type, dxpl_id, frag_addr, frag_size) < 0)
- HGOTO_ERROR(H5E_VFL, H5E_CANTFREE, HADDR_UNDEF, "can't free aggregation fragment")
+ HGOTO_ERROR(H5E_RESOURCE, H5E_CANTFREE, HADDR_UNDEF, "can't free aggregation fragment")
} /* end if */
else {
/* Allocate space out of the block */
@@ -317,7 +317,7 @@ HDfprintf(stderr, "%s: Allocating block\n", FUNC);
/* free any possible fragment */
if (frag_size)
if(H5MF_xfree(f, type, dxpl_id, frag_addr, frag_size) < 0)
- HGOTO_ERROR(H5E_VFL, H5E_CANTFREE, HADDR_UNDEF, "can't free aggregation fragment")
+ HGOTO_ERROR(H5E_RESOURCE, H5E_CANTFREE, HADDR_UNDEF, "can't free aggregation fragment")
} /* end else */
} /* end if */
else {
@@ -333,7 +333,7 @@ HDfprintf(stderr, "%s: Allocating block\n", FUNC);
if(eoa_frag_size)
/* Put fragment on the free list */
if(H5MF_xfree(f, type, dxpl_id, eoa_frag_addr, eoa_frag_size) < 0)
- HGOTO_ERROR(H5E_VFL, H5E_CANTFREE, HADDR_UNDEF, "can't free eoa fragment")
+ HGOTO_ERROR(H5E_RESOURCE, H5E_CANTFREE, HADDR_UNDEF, "can't free eoa fragment")
} /* end else */
/* Sanity check for overlapping into file's temporary allocation space */
@@ -366,7 +366,7 @@ HDfprintf(stderr, "%s: ret_value = %a\n", FUNC, ret_value);
*-------------------------------------------------------------------------
*/
htri_t
-H5MF_aggr_try_extend(const H5F_t *f, H5F_blk_aggr_t *aggr, H5FD_mem_t type,
+H5MF_aggr_try_extend(H5F_t *f, H5F_blk_aggr_t *aggr, H5FD_mem_t type,
haddr_t blk_end, hsize_t extra_requested)
{
htri_t ret_value = FALSE; /* Return value */
@@ -640,8 +640,8 @@ HDfprintf(stderr, "%s: tmp_addr = %a, tmp_size = %Hu\n", FUNC, tmp_addr, tmp_siz
/* Return the unused portion of the metadata block to the file */
if(tmp_size > 0 && (H5F_INTENT(f) & H5F_ACC_RDWR))
- if(H5FD_free(f->shared->lf, dxpl_id, alloc_type, f, tmp_addr, tmp_size) < 0)
- HGOTO_ERROR(H5E_RESOURCE, H5E_CANTFREE, FAIL, "can't free space")
+ if(H5MF_xfree(f, alloc_type, dxpl_id, tmp_addr, tmp_size) < 0)
+ HGOTO_ERROR(H5E_RESOURCE, H5E_CANTFREE, FAIL, "can't release aggregator's free space")
} /* end if */
done: