diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2010-04-06 20:19:02 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2010-04-06 20:19:02 (GMT) |
commit | eeb841b26bdd371f2e3ae506af6390828205691a (patch) | |
tree | 2d385486eb48397020489d16c8eec34cd0231f39 /src/H5HL.c | |
parent | c0d7b109c9ee0c2c3e150e17bc265324c79818a9 (diff) | |
download | hdf5-eeb841b26bdd371f2e3ae506af6390828205691a.zip hdf5-eeb841b26bdd371f2e3ae506af6390828205691a.tar.gz hdf5-eeb841b26bdd371f2e3ae506af6390828205691a.tar.bz2 |
[svn-r18521] Description:
Bring r18520 from trunk to 1.8 branch:
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
(h5committested on trunk)
Diffstat (limited to 'src/H5HL.c')
-rw-r--r-- | src/H5HL.c | 23 |
1 files changed, 2 insertions, 21 deletions
@@ -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; |