summaryrefslogtreecommitdiffstats
path: root/src/H5HF.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2006-03-21 02:59:06 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2006-03-21 02:59:06 (GMT)
commit2db47ff504a58278019957f9e5bc446d58894fed (patch)
tree68c74feaf21d39a5dfbd2612210ceed8dd7ba513 /src/H5HF.c
parenta2f9ebb3ab3228563835681a19cdd88fc095b2ff (diff)
downloadhdf5-2db47ff504a58278019957f9e5bc446d58894fed.zip
hdf5-2db47ff504a58278019957f9e5bc446d58894fed.tar.gz
hdf5-2db47ff504a58278019957f9e5bc446d58894fed.tar.bz2
[svn-r12125] Purpose:
Code checkpoint Description: Update fractal heap code to insert & read heaps up to 64MB in size (with my current configuration paramaters) and add initial support for iteratively walking down nested indirect blocks. Platforms tested: FreeBSD 4.11 (sleipnir) Linux 2.4 (chicago) Solaris 9 (shanti) Linux 2.4 (mir) w/64-bit
Diffstat (limited to 'src/H5HF.c')
-rw-r--r--src/H5HF.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/H5HF.c b/src/H5HF.c
index ac5990b..feb88be 100644
--- a/src/H5HF.c
+++ b/src/H5HF.c
@@ -99,6 +99,7 @@ herr_t
H5HF_create(H5F_t *f, hid_t dxpl_id, H5HF_create_t *cparam, haddr_t *addr_p)
{
H5HF_t *fh = NULL; /* The new fractal heap header information */
+ H5HF_shared_t *shared = NULL; /* Shared fractal heap information */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(H5HF_create, FAIL)
@@ -119,12 +120,16 @@ H5HF_create(H5F_t *f, hid_t dxpl_id, H5HF_create_t *cparam, haddr_t *addr_p)
/* Reset the metadata cache info for the heap header */
HDmemset(&fh->cache_info, 0, sizeof(H5AC_info_t));
+ /* Allocate & basic initialization for the shared info struct */
+ if(NULL == (shared = H5HF_shared_alloc(f)))
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate space for shared heap info")
+
/* Allocate space for the header on disk */
- if(HADDR_UNDEF == (*addr_p = H5MF_alloc(f, H5FD_MEM_FHEAP_HDR, dxpl_id, (hsize_t)H5HF_HEADER_SIZE(f))))
+ if(HADDR_UNDEF == (*addr_p = H5MF_alloc(f, H5FD_MEM_FHEAP_HDR, dxpl_id, (hsize_t)H5HF_HEADER_SIZE(shared))))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "file allocation failed for fractal heap header")
/* Initialize shared fractal heap info */
- if(H5HF_shared_create(f, fh, *addr_p, cparam) < 0)
+ if(H5HF_shared_init(shared, fh, *addr_p, cparam) < 0)
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't create shared fractal heap info")
/* Cache the new fractal heap header */