summaryrefslogtreecommitdiffstats
path: root/src/H5HL.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2010-04-06 19:53:37 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2010-04-06 19:53:37 (GMT)
commit9d9ce9fbd1c8e98225f2fb08db56e8ebc1e9ec56 (patch)
tree272a27a01c186fc139362893df0a5d81602b9e0b /src/H5HL.c
parent0f810834381a67595d8b61383184259e537e996c (diff)
downloadhdf5-9d9ce9fbd1c8e98225f2fb08db56e8ebc1e9ec56.zip
hdf5-9d9ce9fbd1c8e98225f2fb08db56e8ebc1e9ec56.tar.gz
hdf5-9d9ce9fbd1c8e98225f2fb08db56e8ebc1e9ec56.tar.bz2
[svn-r18520] Description:
Bring r18519 from metadata journaling "merging" branch to trunk: Converge metadata_journaling branch and trunk: separate destroy routines for data structures from cache callbacks. 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 (amani) 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.3 (amazon) in debug mode Mac OS X/32 10.6.3 (amazon) w/C++ & FORTRAN, w/threadsafe, in production mode
Diffstat (limited to 'src/H5HL.c')
-rw-r--r--src/H5HL.c23
1 files changed, 2 insertions, 21 deletions
diff --git a/src/H5HL.c b/src/H5HL.c
index f7c1f22..5899ccc 100644
--- a/src/H5HL.c
+++ b/src/H5HL.c
@@ -130,9 +130,9 @@ H5HL_create(H5F_t *f, hid_t dxpl_id, size_t size_hint, haddr_t *addr_p/*out*/)
size_hint = H5HL_SIZEOF_FREE(f);
size_hint = H5HL_ALIGN(size_hint);
- /* Allocate memory structure */
+ /* Allocate new heap structure */
if(NULL == (heap = H5HL_new(H5F_SIZEOF_SIZE(f), H5F_SIZEOF_ADDR(f), H5HL_SIZEOF_HDR(f))))
- HGOTO_ERROR(H5E_HEAP, H5E_CANTALLOC, FAIL, "memory allocation failed")
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTALLOC, FAIL, "can't allocate new heap struct")
/* Allocate file space */
total_size = heap->prfx_size + size_hint;
@@ -1098,25 +1098,6 @@ H5HL_delete(H5F_t *f, hid_t dxpl_id, haddr_t addr)
} /* end if */
} /* end if */
- /* Check if the heap is contiguous on disk */
- if(heap->single_cache_obj) {
- /* Free the contiguous local heap in one call */
- H5_CHECK_OVERFLOW(heap->prfx_size + heap->dblk_size, size_t, hsize_t);
- if(H5MF_xfree(f, H5FD_MEM_LHEAP, dxpl_id, addr, (hsize_t)(heap->prfx_size + heap->dblk_size)) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL, "unable to free contiguous local heap")
- } /* end if */
- else {
- /* Free the local heap's prefix */
- H5_CHECK_OVERFLOW(heap->prfx_size, size_t, hsize_t);
- if(H5MF_xfree(f, H5FD_MEM_LHEAP, dxpl_id, heap->prfx_addr, (hsize_t)heap->prfx_size) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL, "unable to free local heap header")
-
- /* Free the local heap's data block */
- H5_CHECK_OVERFLOW(heap->dblk_size, size_t, hsize_t);
- if(H5MF_xfree(f, H5FD_MEM_LHEAP, dxpl_id, heap->dblk_addr, (hsize_t)heap->dblk_size) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL, "unable to free local heap data")
- } /* end else */
-
/* Set the flags for releasing the prefix and data block */
cache_flags |= H5AC__DIRTIED_FLAG | H5AC__DELETED_FLAG | H5AC__FREE_FILE_SPACE_FLAG;