summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2006-08-10 03:45:06 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2006-08-10 03:45:06 (GMT)
commitb648c14f13498349a743e9ef925399a8e6b592de (patch)
treed57c6f51cd835e055d8e75740e3c340edf1e5ef0
parentf06e8744a54fdf7454fd5f4d76e9b10f16076d22 (diff)
downloadhdf5-b648c14f13498349a743e9ef925399a8e6b592de.zip
hdf5-b648c14f13498349a743e9ef925399a8e6b592de.tar.gz
hdf5-b648c14f13498349a743e9ef925399a8e6b592de.tar.bz2
[svn-r12562] Description:
Initial revision to add support for "huge" objects in the heap (which are actually stored directly in the file, but are tracked with v2 B-tree that is accessed through heap header). Testing: FreeBSD 4.11 (sleipnir) Linux/64 2.4 (mir) Linux/32 2.4 (heping) Mac OS X.4 (amazon)
-rw-r--r--MANIFEST2
-rw-r--r--src/H5FDpublic.h4
-rw-r--r--src/H5HF.c93
-rw-r--r--src/H5HFbtree2.c370
-rw-r--r--src/H5HFcache.c4
-rw-r--r--src/H5HFdbg.c2
-rw-r--r--src/H5HFhdr.c8
-rw-r--r--src/H5HFhuge.c574
-rw-r--r--src/H5HFint.c116
-rw-r--r--src/H5HFpkg.h55
-rw-r--r--src/H5HFprivate.h3
-rw-r--r--src/H5HFsection.c14
-rw-r--r--src/H5HFspace.c2
-rwxr-xr-xsrc/Makefile.am4
-rw-r--r--src/Makefile.in12
-rw-r--r--test/fheap.c1014
16 files changed, 1699 insertions, 578 deletions
diff --git a/MANIFEST b/MANIFEST
index 8a6564d..3235886 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -498,11 +498,13 @@
./src/H5Gtest.c
./src/H5Gtraverse.c
./src/H5HF.c
+./src/H5HFbtree2.c
./src/H5HFcache.c
./src/H5HFdbg.c
./src/H5HFdblock.c
./src/H5HFdtable.c
./src/H5HFhdr.c
+./src/H5HFhuge.c
./src/H5HFiblock.c
./src/H5HFint.c
./src/H5HFiter.c
diff --git a/src/H5FDpublic.h b/src/H5FDpublic.h
index f50a7fa..4a1e084 100644
--- a/src/H5FDpublic.h
+++ b/src/H5FDpublic.h
@@ -53,11 +53,15 @@ typedef enum H5FD_mem_t {
* Map "fractal heap" direct blocks to 'lheap' type file memory, since they
* will be replacing local heaps.
*
+ * Map "fractal heap" 'huge' objects to 'draw' type file memory, since they
+ * represent large objects that are directly stored in the file.
+ *
* -QAK
*/
#define H5FD_MEM_FHEAP_HDR H5FD_MEM_OHDR
#define H5FD_MEM_FHEAP_IBLOCK H5FD_MEM_OHDR
#define H5FD_MEM_FHEAP_DBLOCK H5FD_MEM_LHEAP
+#define H5FD_MEM_FHEAP_HUGE_OBJ H5FD_MEM_DRAW
/* Map "free space" header blocks to 'ohdr' type file memory, since its
* a fair amount of work to add a new kind of file memory and they are similar
diff --git a/src/H5HF.c b/src/H5HF.c
index 85fb7dc..036c054 100644
--- a/src/H5HF.c
+++ b/src/H5HF.c
@@ -355,7 +355,9 @@ HDfprintf(stderr, "%s: size = %Zu\n", FUNC, size);
/* Check if object is large enough to be standalone */
if(size > hdr->max_man_size) {
-HGOTO_ERROR(H5E_HEAP, H5E_UNSUPPORTED, FAIL, "standalone blocks not supported yet")
+ /* Store 'huge' object in heap */
+ if(H5HF_huge_insert(hdr, dxpl_id, size, obj, id) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTALLOC, FAIL, "can't allocate space for 'managed' object in fractal heap")
} /* end if */
else {
/* Check if we are in "append only" mode, or if there's enough room for the object */
@@ -363,15 +365,9 @@ HGOTO_ERROR(H5E_HEAP, H5E_UNSUPPORTED, FAIL, "standalone blocks not supported ye
HGOTO_ERROR(H5E_HEAP, H5E_UNSUPPORTED, FAIL, "'write once' managed blocks not supported yet")
} /* end if */
else {
- H5HF_free_section_t *sec_node; /* Pointer to free space section */
-
- /* Find free space in heap */
- if(H5HF_man_find(hdr, dxpl_id, size, &sec_node) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTALLOC, FAIL, "can't allocate space in fractal heap")
-
- /* Use free space for allocating object */
- if(H5HF_man_insert(hdr, dxpl_id, sec_node, size, obj, id) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTALLOC, FAIL, "can't allocate space for object in fractal heap")
+ /* Allocate space for object in 'managed' heap */
+ if(H5HF_man_insert(hdr, dxpl_id, size, obj, id) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTALLOC, FAIL, "can't allocate space for 'managed' object in fractal heap")
} /* end else */
} /* end else */
@@ -397,7 +393,7 @@ HDfprintf(stderr, "%s: Leaving, ret_value = %d\n", FUNC, ret_value);
*-------------------------------------------------------------------------
*/
herr_t
-H5HF_get_obj_len(H5HF_t *fh, const void *_id, size_t *obj_len_p)
+H5HF_get_obj_len(H5HF_t *fh, hid_t dxpl_id, const void *_id, size_t *obj_len_p)
{
const uint8_t *id = (const uint8_t *)_id; /* Object ID */
uint8_t id_flags; /* Heap ID flag bits */
@@ -419,7 +415,7 @@ H5HF_get_obj_len(H5HF_t *fh, const void *_id, size_t *obj_len_p)
if((id_flags & H5HF_ID_VERS_MASK) != H5HF_ID_VERS_CURR)
HGOTO_ERROR(H5E_HEAP, H5E_VERSION, FAIL, "incorrect heap ID version")
- /* Check for managed object */
+ /* Check type of object in heap */
if((id_flags & H5HF_ID_TYPE_MASK) == H5HF_ID_TYPE_MAN) {
/* Skip over object offset */
id += fh->hdr->heap_off_size;
@@ -427,6 +423,10 @@ H5HF_get_obj_len(H5HF_t *fh, const void *_id, size_t *obj_len_p)
/* Retrieve the entry length */
UINT64DECODE_VAR(id, *obj_len_p, fh->hdr->heap_len_size);
} /* end if */
+ else if((id_flags & H5HF_ID_TYPE_MASK) == H5HF_ID_TYPE_HUGE) {
+ if(H5HF_huge_get_obj_len(fh->hdr, dxpl_id, id, obj_len_p) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "can't get 'huge' object's length")
+ } /* end if */
else {
HDfprintf(stderr, "%s: Heap ID type not supported yet!\n", FUNC);
HGOTO_ERROR(H5E_HEAP, H5E_UNSUPPORTED, FAIL, "heap ID type not supported yet")
@@ -473,22 +473,17 @@ H5HF_read(H5HF_t *fh, hid_t dxpl_id, const void *_id, void *obj/*out*/)
if((id_flags & H5HF_ID_VERS_MASK) != H5HF_ID_VERS_CURR)
HGOTO_ERROR(H5E_HEAP, H5E_VERSION, FAIL, "incorrect heap ID version")
- /* Check for managed object */
+ /* Check type of object in heap */
if((id_flags & H5HF_ID_TYPE_MASK) == H5HF_ID_TYPE_MAN) {
- hsize_t obj_off; /* Object's offset in heap */
- size_t obj_len; /* Object's length in heap */
-
- /* Decode the object offset within the heap & it's length */
- UINT64DECODE_VAR(id, obj_off, fh->hdr->heap_off_size);
- UINT64DECODE_VAR(id, obj_len, fh->hdr->heap_len_size);
-#ifdef QAK
-HDfprintf(stderr, "%s: obj_off = %Hu, obj_len = %Zu\n", FUNC, obj_off, obj_len);
-#endif /* QAK */
-
/* Read object from managed heap blocks */
- if(H5HF_man_read(fh->hdr, dxpl_id, obj_off, obj_len, obj) < 0)
+ if(H5HF_man_read(fh->hdr, dxpl_id, id, obj) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "can't read object from fractal heap")
} /* end if */
+ else if((id_flags & H5HF_ID_TYPE_MASK) == H5HF_ID_TYPE_HUGE) {
+ /* Read 'huge' object from file */
+ if(H5HF_huge_read(fh->hdr, dxpl_id, id, obj) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "can't read 'huge' object from fractal heap")
+ } /* end if */
else {
HDfprintf(stderr, "%s: Heap ID type not supported yet!\n", FUNC);
HGOTO_ERROR(H5E_HEAP, H5E_UNSUPPORTED, FAIL, "heap ID type not supported yet")
@@ -535,29 +530,17 @@ H5HF_remove(H5HF_t *fh, hid_t dxpl_id, const void *_id)
if((id_flags & H5HF_ID_VERS_MASK) != H5HF_ID_VERS_CURR)
HGOTO_ERROR(H5E_HEAP, H5E_VERSION, FAIL, "incorrect heap ID version")
- /* Check for managed object */
+ /* Check type of object in heap */
if((id_flags & H5HF_ID_TYPE_MASK) == H5HF_ID_TYPE_MAN) {
- hsize_t obj_off; /* Object's offset in heap */
- size_t obj_len; /* Object's length in heap */
-
- /* Decode the object offset within the heap & it's length */
-#ifdef QAK
-HDfprintf(stderr, "%s: fh->hdr->heap_off_size = %u, fh->hdr->heap_len_size = %u\n", FUNC, (unsigned)fh->hdr->heap_off_size, (unsigned)fh->hdr->heap_len_size);
-#endif /* QAK */
- UINT64DECODE_VAR(id, obj_off, fh->hdr->heap_off_size);
- UINT64DECODE_VAR(id, obj_len, fh->hdr->heap_len_size);
-#ifdef QAK
-HDfprintf(stderr, "%s: obj_off = %Hu, obj_len = %Zu\n", FUNC, obj_off, obj_len);
-#endif /* QAK */
-
- /* Sanity check parameters */
- HDassert(obj_off);
- HDassert(obj_len);
-
/* Remove object from managed heap blocks */
- if(H5HF_man_remove(fh->hdr, dxpl_id, obj_off, obj_len) < 0)
+ if(H5HF_man_remove(fh->hdr, dxpl_id, id) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTREMOVE, FAIL, "can't remove object from fractal heap")
} /* end if */
+ else if((id_flags & H5HF_ID_TYPE_MASK) == H5HF_ID_TYPE_HUGE) {
+ /* Remove 'huge' object from file & v2 B-tree tracker */
+ if(H5HF_huge_remove(fh->hdr, dxpl_id, id) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTREMOVE, FAIL, "can't remove 'huge' object from fractal heap")
+ } /* end if */
else {
HDfprintf(stderr, "%s: Heap ID type not supported yet!\n", FUNC);
HGOTO_ERROR(H5E_HEAP, H5E_UNSUPPORTED, FAIL, "heap ID type not supported yet")
@@ -611,7 +594,7 @@ H5HF_close(H5HF_t *fh, hid_t dxpl_id)
if(H5HF_space_close(fh->hdr, dxpl_id) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "can't release free space info")
- /* Reset the block iterator */
+ /* Reset the block iterator, if necessary */
/* (Can't put this in header "destroy" routine, because it has
* pointers to indirect blocks in the heap, which would create
* a reference loop and the objects couldn't be removed from
@@ -622,15 +605,21 @@ HDfprintf(stderr, "%s; fh->hdr->man_iter_off = %Hu\n", FUNC, fh->hdr->man_iter_o
HDfprintf(stderr, "%s; fh->hdr->man_size = %Hu\n", FUNC, fh->hdr->man_size);
HDfprintf(stderr, "%s; fh->hdr->rc = %Zu\n", FUNC, fh->hdr->rc);
#endif /* QAK */
- /* Reset block iterator, if necessary */
- if(H5HF_man_iter_ready(&fh->hdr->next_block)) {
+ if(H5HF_man_iter_ready(&fh->hdr->next_block))
if(H5HF_man_iter_reset(&fh->hdr->next_block) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "can't reset block iterator")
- } /* end if */
#ifdef QAK
HDfprintf(stderr, "%s; After iterator reset fh->hdr->rc = %Zu\n", FUNC, fh->hdr->rc);
#endif /* QAK */
+ /* Shut down the huge object information */
+ /* (Can't put this in header "destroy" routine, because it has
+ * has the address of an object in the file, which might be
+ * by the shutdown routine - QAK)
+ */
+ if(H5HF_huge_term(fh->hdr, dxpl_id) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "can't release 'huge' object info")
+
/* Decrement the reference count on the heap header */
if(H5HF_hdr_decr(fh->hdr) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTDEC, FAIL, "can't decrement reference count on shared heap header")
@@ -712,6 +701,16 @@ HDfprintf(stderr, "%s: hdr->man_dtable.table_addr = %a\n", FUNC, hdr->man_dtable
} /* end else */
} /* end if */
+ /* Check for 'huge' objects in heap */
+ if(H5F_addr_defined(hdr->huge_bt2_addr)) {
+#ifdef QAK
+HDfprintf(stderr, "%s: hdr->huge_bt2_addr = %a\n", FUNC, hdr->huge_bt2_addr);
+#endif /* QAK */
+ /* Delete huge objects in heap and their tracker */
+ if(H5HF_huge_delete(hdr, dxpl_id) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL, "unable to release fractal heap 'huge' objects and tracker")
+ } /* end if */
+
/* Release header's disk space */
if(H5MF_xfree(f, H5FD_MEM_FHEAP_HDR, dxpl_id, fh_addr, (hsize_t)H5HF_HEADER_SIZE(hdr)) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL, "unable to release fractal heap header")
diff --git a/src/H5HFbtree2.c b/src/H5HFbtree2.c
new file mode 100644
index 0000000..4a324aa
--- /dev/null
+++ b/src/H5HFbtree2.c
@@ -0,0 +1,370 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright by the Board of Trustees of the University of Illinois. *
+ * All rights reserved. *
+ * *
+ * This file is part of HDF5. The full HDF5 copyright notice, including *
+ * terms governing use, modification, and redistribution, is contained in *
+ * the files COPYING and Copyright.html. COPYING can be found at the root *
+ * of the source code distribution tree; Copyright.html can be found at the *
+ * root level of an installed copy of the electronic HDF5 document set and *
+ * is linked from the top-level documents page. It can also be found at *
+ * http://hdf.ncsa.uiuc.edu/HDF5/doc/Copyright.html. If you do not have *
+ * access to either file, you may request a copy from hdfhelp@ncsa.uiuc.edu. *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+/*-------------------------------------------------------------------------
+ *
+ * Created: H5HFbtree2.c
+ * Aug 7 2006
+ * Quincey Koziol <koziol@hdfgroup.org>
+ *
+ * Purpose: v2 B-tree callbacks for "huge" object tracker
+ *
+ *-------------------------------------------------------------------------
+ */
+
+/****************/
+/* Module Setup */
+/****************/
+
+#define H5HF_PACKAGE /*suppress error about including H5HFpkg */
+
+
+/***********/
+/* Headers */
+/***********/
+#include "H5private.h" /* Generic Functions */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5HFpkg.h" /* Fractal heaps */
+#include "H5MFprivate.h" /* File memory management */
+
+
+/****************/
+/* Local Macros */
+/****************/
+
+
+/******************/
+/* Local Typedefs */
+/******************/
+
+
+/********************/
+/* Package Typedefs */
+/********************/
+
+
+/********************/
+/* Local Prototypes */
+/********************/
+
+/* v2 B-tree function callbacks */
+herr_t H5HF_huge_bt2_found(const void *nrecord, void *op_data);
+herr_t H5HF_huge_bt2_remove(const void *nrecord, void *op_data);
+
+/* v2 B-tree driver callbacks */
+static herr_t H5HF_huge_btree2_store(const H5B2_class_t *cls, void *native, const void *udata);
+static herr_t H5HF_huge_btree2_retrieve(const H5B2_class_t *cls, void *udata, const void *native);
+static herr_t H5HF_huge_btree2_compare(const H5B2_class_t *cls, const void *rec1, const void *rec2);
+static herr_t H5HF_huge_btree2_encode(const H5F_t *f, const H5B2_class_t *cls, uint8_t *raw,
+ const void *native);
+static herr_t H5HF_huge_btree2_decode(const H5F_t *f, const H5B2_class_t *cls, const uint8_t *raw,
+ void *native);
+static herr_t H5HF_huge_btree2_debug(FILE *stream, const H5F_t *f, hid_t dxpl_id,
+ int indent, int fwidth, const H5B2_class_t *cls, const void *record, const void *_udata);
+
+/*********************/
+/* Package Variables */
+/*********************/
+const H5B2_class_t H5HF_BTREE2[1]={{ /* B-tree class information */
+ H5B2_FHEAP_ID, /* Type of B-tree */
+ 0, /* Size of native record */
+ /* (computed at run-time for each heap) */
+ NULL, /* Class private information */
+ H5HF_huge_btree2_store, /* Record storage callback */
+ H5HF_huge_btree2_retrieve, /* Record retrieval callback */
+ H5HF_huge_btree2_compare, /* Record comparison callback */
+ H5HF_huge_btree2_encode, /* Record encoding callback */
+ H5HF_huge_btree2_decode, /* Record decoding callback */
+ H5HF_huge_btree2_debug /* Record debugging callback */
+}};
+
+/*****************************/
+/* Library Private Variables */
+/*****************************/
+
+
+/*******************/
+/* Local Variables */
+/*******************/
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5HF_huge_bt2_found
+ *
+ * Purpose: Retrieve record for 'huge' object, when it's found in the
+ * v2 B-tree
+ *
+ * Return: Success: non-negative
+ * Failure: negative
+ *
+ * Programmer: Quincey Koziol
+ * Tuesday, August 8, 2006
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5HF_huge_bt2_found(const void *nrecord, void *op_data)
+{
+ FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5HF_huge_bt2_found)
+
+#ifdef QAK
+HDfprintf(stderr, "%s: nrecord = {%a, %Hu, %Hu}\n", "H5HF_huge_bt2_store",
+ ((const H5HF_huge_bt2_rec_t *)nrecord)->addr,
+ ((const H5HF_huge_bt2_rec_t *)nrecord)->len,
+ ((const H5HF_huge_bt2_rec_t *)nrecord)->id);
+#endif /* QAK */
+ *(H5HF_huge_bt2_rec_t *)op_data = *(const H5HF_huge_bt2_rec_t *)nrecord;
+
+ FUNC_LEAVE_NOAPI(SUCCEED)
+} /* H5HF_huge_bt2_found() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5HF_huge_bt2_remove
+ *
+ * Purpose: Free space for 'huge' object, as v2 B-tree is being deleted
+ *
+ * Return: Success: non-negative
+ * Failure: negative
+ *
+ * Programmer: Quincey Koziol
+ * Tuesday, August 8, 2006
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5HF_huge_bt2_remove(const void *nrecord, void *_udata)
+{
+ H5HF_huge_remove_ud1_t *udata = (H5HF_huge_remove_ud1_t *)_udata; /* User callback data */
+ herr_t ret_value = SUCCEED; /* Return value */
+
+ FUNC_ENTER_NOAPI_NOINIT(H5HF_huge_bt2_remove)
+
+ /* Free the space in the file for the object being removed */
+ if(H5MF_xfree(udata->hdr->f, H5FD_MEM_FHEAP_HUGE_OBJ, udata->dxpl_id, ((const H5HF_huge_bt2_rec_t *)nrecord)->addr, ((const H5HF_huge_bt2_rec_t *)nrecord)->len) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL, "unable to free space for huge object on disk")
+
+ /* Set the length of the object removed */
+ udata->obj_len = ((const H5HF_huge_bt2_rec_t *)nrecord)->len;
+
+done:
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* H5HF_huge_bt2_remove() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5HF_huge_btree2_store
+ *
+ * Purpose: Store native information into record for v2 B-tree
+ *
+ * Return: Success: non-negative
+ *
+ * Failure: negative
+ *
+ * Programmer: Quincey Koziol
+ * Monday, August 7, 2006
+ *
+ *-------------------------------------------------------------------------
+ */
+static herr_t
+H5HF_huge_btree2_store(const H5B2_class_t UNUSED *cls, void *nrecord, const void *udata)
+{
+ FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5HF_huge_btree2_store)
+
+ *(H5HF_huge_bt2_rec_t *)nrecord = *(const H5HF_huge_bt2_rec_t *)udata;
+
+ FUNC_LEAVE_NOAPI(SUCCEED)
+} /* H5HF_huge_btree2_store() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5HF_huge_btree2_retrieve
+ *
+ * Purpose: Retrieve native information from record for v2 B-tree
+ *
+ * Return: Success: non-negative
+ *
+ * Failure: negative
+ *
+ * Programmer: Quincey Koziol
+ * Monday, August 7, 2006
+ *
+ *-------------------------------------------------------------------------
+ */
+static herr_t
+H5HF_huge_btree2_retrieve(const H5B2_class_t UNUSED *cls, void *udata, const void *nrecord)
+{
+ FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5HF_huge_btree2_retrieve)
+
+ *(H5HF_huge_bt2_rec_t *)udata = *(const H5HF_huge_bt2_rec_t *)nrecord;
+
+ FUNC_LEAVE_NOAPI(SUCCEED)
+} /* H5HF_huge_btree2_retrieve() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5HF_huge_btree2_compare
+ *
+ * Purpose: Compare two native information records, according to some key
+ *
+ * Return: <0 if rec1 < rec2
+ * =0 if rec1 == rec2
+ * >0 if rec1 > rec2
+ *
+ * Programmer: Quincey Koziol
+ * Monday, August 7, 2006
+ *
+ *-------------------------------------------------------------------------
+ */
+static herr_t
+H5HF_huge_btree2_compare(const H5B2_class_t *cls, const void *_rec1, const void *_rec2)
+{
+ const H5HF_huge_bt2_rec_t *rec1 = (const H5HF_huge_bt2_rec_t *)_rec1;
+ const H5HF_huge_bt2_rec_t *rec2 = (const H5HF_huge_bt2_rec_t *)_rec2;
+ const H5HF_hdr_t *hdr = (const H5HF_hdr_t *)cls->cls_private;
+ herr_t ret_value; /* Return value */
+
+ FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5HF_huge_btree2_compare)
+
+#ifdef QAK
+HDfprintf(stderr, "%s: hdr->huge_ids_direct = %t\n", "H5HF_huge_btree2_compare", hdr->huge_ids_direct);
+HDfprintf(stderr, "%s: rec1 = {%a, %Hu, %Hu}\n", "H5HF_huge_btree2_compare", rec1->addr, rec1->len, rec1->id);
+HDfprintf(stderr, "%s: rec2 = {%a, %Hu, %Hu}\n", "H5HF_huge_btree2_compare", rec2->addr, rec2->len, rec2->id);
+#endif /* QAK */
+ /* Sort differently, depending on whether 'huge' object directly reference disk */
+ if(hdr->huge_ids_direct) {
+ if(rec1->addr < rec2->addr)
+ ret_value = -1;
+ else if(rec1->addr > rec2->addr)
+ ret_value = 1;
+ else if(rec1->len < rec2->len)
+ ret_value = -1;
+ else if(rec1->len > rec2->len)
+ ret_value = 1;
+ else
+ ret_value = 0;
+ } /* end if */
+ else
+ ret_value = (herr_t)(rec1->id - rec2->id);
+
+ FUNC_LEAVE_NOAPI(ret_value);
+} /* H5HF_huge_btree2_compare() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5HF_huge_btree2_encode
+ *
+ * Purpose: Encode native information into raw form for storing on disk
+ *
+ * Return: Success: non-negative
+ *
+ * Failure: negative
+ *
+ * Programmer: Quincey Koziol
+ * Monday, August 7, 2006
+ *
+ *-------------------------------------------------------------------------
+ */
+static herr_t
+H5HF_huge_btree2_encode(const H5F_t *f, const H5B2_class_t *cls, uint8_t *raw, const void *_nrecord)
+{
+ const H5HF_huge_bt2_rec_t *nrecord = (const H5HF_huge_bt2_rec_t *)_nrecord;
+ const H5HF_hdr_t *hdr = (const H5HF_hdr_t *)cls->cls_private;
+
+ FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5HF_huge_btree2_encode)
+
+ /* Encode the record's common fields */
+ H5F_addr_encode(f, &raw, nrecord->addr);
+ H5F_ENCODE_LENGTH(f, raw, nrecord->len);
+
+ /* If 'huge' objects in this heap are not accessed directly, encode the ID also */
+ if(!hdr->huge_ids_direct)
+ UINT64ENCODE_VAR(raw, nrecord->id, hdr->huge_id_size)
+
+ FUNC_LEAVE_NOAPI(SUCCEED)
+} /* H5HF_huge_btree2_encode() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5HF_huge_btree2_decode
+ *
+ * Purpose: Decode raw disk form of record into native form
+ *
+ * Return: Success: non-negative
+ *
+ * Failure: negative
+ *
+ * Programmer: Quincey Koziol
+ * Monday, August 7, 2006
+ *
+ *-------------------------------------------------------------------------
+ */
+static herr_t
+H5HF_huge_btree2_decode(const H5F_t *f, const H5B2_class_t *cls, const uint8_t *raw, void *_nrecord)
+{
+ H5HF_huge_bt2_rec_t *nrecord = (H5HF_huge_bt2_rec_t *)_nrecord;
+ const H5HF_hdr_t *hdr = (const H5HF_hdr_t *)cls->cls_private;
+
+ FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5HF_huge_btree2_decode)
+
+ /* Decode the record's common fields */
+ H5F_addr_decode(f, &raw, &nrecord->addr);
+ H5F_DECODE_LENGTH(f, raw, nrecord->len);
+
+ /* If 'huge' objects in this heap are not accessed directly, decode the ID also */
+ if(!hdr->huge_ids_direct)
+ UINT64DECODE_VAR(raw, nrecord->id, hdr->huge_id_size)
+ else
+ nrecord->id = 0;
+
+ FUNC_LEAVE_NOAPI(SUCCEED)
+} /* H5HF_huge_btree2_decode() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5HF_huge_btree2_debug
+ *
+ * Purpose: Debug native form of record
+ *
+ * Return: Success: non-negative
+ *
+ * Failure: negative
+ *
+ * Programmer: Quincey Koziol
+ * Monday, August 7, 2006
+ *
+ *-------------------------------------------------------------------------
+ */
+static herr_t
+H5HF_huge_btree2_debug(FILE *stream, const H5F_t UNUSED *f, hid_t UNUSED dxpl_id,
+ int indent, int fwidth, const H5B2_class_t *cls, const void *_nrecord,
+ const void UNUSED *_udata)
+{
+ const H5HF_huge_bt2_rec_t *nrecord = (const H5HF_huge_bt2_rec_t *)_nrecord;
+ const H5HF_hdr_t *hdr = (const H5HF_hdr_t *)cls->cls_private;
+
+ FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5HF_huge_btree2_debug)
+
+ HDassert(nrecord);
+
+ if(hdr->huge_ids_direct)
+ HDfprintf(stream, "%*s%-*s {%a, %Hu}\n", indent, "", fwidth, "Record:",
+ nrecord->addr, nrecord->len);
+ else
+ HDfprintf(stream, "%*s%-*s {%a, %Hu, %Hu}\n", indent, "", fwidth, "Record:",
+ nrecord->addr, nrecord->len, nrecord->id);
+
+ FUNC_LEAVE_NOAPI(SUCCEED)
+} /* H5HF_huge_btree2_debug() */
+
diff --git a/src/H5HFcache.c b/src/H5HFcache.c
index 53bf5ea..4915533 100644
--- a/src/H5HFcache.c
+++ b/src/H5HFcache.c
@@ -317,7 +317,7 @@ HDfprintf(stderr, "%s: Load heap header, addr = %a\n", FUNC, addr);
/* "Huge" object information */
UINT32DECODE(p, hdr->max_man_size); /* Max. size of "managed" objects */
H5F_DECODE_LENGTH(f, p, hdr->huge_next_id); /* Next ID to use for "huge" object */
- H5F_addr_decode(f, &p, &hdr->huge_bt_addr); /* Address of "huge" object tracker B-tree */
+ H5F_addr_decode(f, &p, &hdr->huge_bt2_addr); /* Address of "huge" object tracker B-tree */
/* "Managed" object free space information */
H5F_DECODE_LENGTH(f, p, hdr->total_man_free); /* Internal free space in managed direct blocks */
@@ -428,7 +428,7 @@ HDfprintf(stderr, "%s: Flushing heap header, addr = %a, destroy = %u\n", FUNC, a
/* "Huge" object information */
UINT32ENCODE(p, hdr->max_man_size); /* Max. size of "managed" objects */
H5F_ENCODE_LENGTH(f, p, hdr->huge_next_id); /* Next ID to use for "huge" object */
- H5F_addr_encode(f, &p, hdr->huge_bt_addr); /* Address of "huge" object tracker B-tree */
+ H5F_addr_encode(f, &p, hdr->huge_bt2_addr); /* Address of "huge" object tracker B-tree */
/* "Managed" object free space information */
H5F_ENCODE_LENGTH(f, p, hdr->total_man_free); /* Internal free space in managed direct blocks */
diff --git a/src/H5HFdbg.c b/src/H5HFdbg.c
index b603f0a..cfff2ca 100644
--- a/src/H5HFdbg.c
+++ b/src/H5HFdbg.c
@@ -256,7 +256,7 @@ H5HF_hdr_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int indent,
hdr->huge_next_id);
HDfprintf(stream, "%*s%-*s %Hu\n", indent, "", fwidth,
"Address of v2 B-tree for 'huge' objects:",
- hdr->huge_bt_addr);
+ hdr->huge_bt2_addr);
HDfprintf(stream, "%*sManaged Objects Doubling-Table Info...\n", indent, "");
H5HF_dtable_debug(&hdr->man_dtable, stream, indent + 3, MAX(0, fwidth -3));
diff --git a/src/H5HFhdr.c b/src/H5HFhdr.c
index b93b8bf..3b09d81 100644
--- a/src/H5HFhdr.c
+++ b/src/H5HFhdr.c
@@ -249,6 +249,10 @@ HDfprintf(stderr, "%s: row_max_dblock_free[%Zu] = %Zu\n", FUNC, u, hdr->man_dtab
if(H5HF_man_iter_init(&hdr->next_block) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't initialize space search block iterator")
+ /* Initialize the information for tracking 'huge' objects */
+ if(H5HF_huge_init(hdr) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't informan for tracking huge objects")
+
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HF_hdr_finish_init() */
@@ -318,8 +322,8 @@ H5HF_hdr_init(H5HF_hdr_t *hdr, haddr_t fh_addr, const H5HF_create_t *cparam)
/* Set free list header address to indicate that the heap is empty currently */
hdr->fs_addr = HADDR_UNDEF;
- /* Set "huge" object tracker B-tree address to indicate that there aren't any yet */
- hdr->huge_bt_addr = HADDR_UNDEF;
+ /* Set "huge" object tracker v2 B-tree address to indicate that there aren't any yet */
+ hdr->huge_bt2_addr = HADDR_UNDEF;
/* Note that the shared info is dirty (it's not written to the file yet) */
hdr->dirty = TRUE;
diff --git a/src/H5HFhuge.c b/src/H5HFhuge.c
new file mode 100644
index 0000000..517367b
--- /dev/null
+++ b/src/H5HFhuge.c
@@ -0,0 +1,574 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright by the Board of Trustees of the University of Illinois. *
+ * All rights reserved. *
+ * *
+ * This file is part of HDF5. The full HDF5 copyright notice, including *
+ * terms governing use, modification, and redistribution, is contained in *
+ * the files COPYING and Copyright.html. COPYING can be found at the root *
+ * of the source code distribution tree; Copyright.html can be found at the *
+ * root level of an installed copy of the electronic HDF5 document set and *
+ * is linked from the top-level documents page. It can also be found at *
+ * http://hdf.ncsa.uiuc.edu/HDF5/doc/Copyright.html. If you do not have *
+ * access to either file, you may request a copy from hdfhelp@ncsa.uiuc.edu. *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+/*-------------------------------------------------------------------------
+ *
+ * Created: H5HFhuge.c
+ * Aug 7 2006
+ * Quincey Koziol <koziol@hdfgroup.org>
+ *
+ * Purpose: Routines for "huge" objects in fractal heap
+ *
+ *-------------------------------------------------------------------------
+ */
+
+/****************/
+/* Module Setup */
+/****************/
+
+#define H5HF_PACKAGE /*suppress error about including H5HFpkg */
+
+
+/***********/
+/* Headers */
+/***********/
+#include "H5private.h" /* Generic Functions */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5HFpkg.h" /* Fractal heaps */
+#include "H5MFprivate.h" /* File memory management */
+
+
+/****************/
+/* Local Macros */
+/****************/
+
+/* v2 B-tree creation macros */
+#define H5HF_HUGE_BT2_NODE_SIZE 512
+#define H5HF_HUGE_BT2_SPLIT_PERC 100
+#define H5HF_HUGE_BT2_MERGE_PERC 40
+
+
+/******************/
+/* Local Typedefs */
+/******************/
+
+
+/********************/
+/* Package Typedefs */
+/********************/
+
+
+/********************/
+/* Local Prototypes */
+/********************/
+
+/* local v2 B-tree operations */
+static herr_t H5HF_huge_bt2_create(H5HF_hdr_t *hdr, hid_t dxpl_id);
+
+/* v2 B-tree function callbacks (in H5HFbtree2.c) */
+herr_t H5HF_huge_bt2_found(const void *nrecord, void *op_data);
+herr_t H5HF_huge_bt2_remove(const void *nrecord, void *op_data);
+
+/*********************/
+/* Package Variables */
+/*********************/
+
+/* The v2 B-tree class for tracking huge objects */
+H5_DLLVAR const H5B2_class_t H5HF_BTREE2[1];
+
+
+/*****************************/
+/* Library Private Variables */
+/*****************************/
+
+
+/*******************/
+/* Local Variables */
+/*******************/
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5HF_huge_bt2_create
+ *
+ * Purpose: Create the v2 B-tree for tracking the huge objects in the heap
+ *
+ * Return: SUCCEED/FAIL
+ *
+ * Programmer: Quincey Koziol
+ * koziol@hdfgroup.org
+ * Aug 7 2006
+ *
+ *-------------------------------------------------------------------------
+ */
+static herr_t
+H5HF_huge_bt2_create(H5HF_hdr_t *hdr, hid_t dxpl_id)
+{
+ size_t rrec_size; /* Size of 'raw' records on disk */
+ herr_t ret_value = SUCCEED; /* Return value */
+
+ FUNC_ENTER_NOAPI_NOINIT(H5HF_huge_bt2_create)
+
+ /*
+ * Check arguments.
+ */
+ HDassert(hdr);
+
+ /* Compute the size of 'raw' records on disk */
+ if(hdr->huge_ids_direct)
+ rrec_size = hdr->sizeof_addr + hdr->sizeof_size;
+ else
+ rrec_size = hdr->sizeof_addr + hdr->sizeof_size + hdr->huge_id_size;
+
+ /* Create v2 B-tree for tracking 'huge' objects */
+ if(H5B2_create(hdr->f, dxpl_id, &hdr->huge_bt2_class, H5HF_HUGE_BT2_NODE_SIZE, rrec_size,
+ H5HF_HUGE_BT2_SPLIT_PERC, H5HF_HUGE_BT2_MERGE_PERC, &hdr->huge_bt2_addr/*out*/) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTCREATE, FAIL, "can't create v2 B-tree for tracking 'huge' heap objects")
+
+done:
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* end H5HF_huge_bt2_create() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5HF_huge_init
+ *
+ * Purpose: Initialize information for tracking 'huge' objects
+ *
+ * Return: SUCCEED/FAIL
+ *
+ * Programmer: Quincey Koziol
+ * koziol@hdfgroup.org
+ * Aug 7 2006
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5HF_huge_init(H5HF_hdr_t *hdr)
+{
+ FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5HF_huge_init)
+
+ /*
+ * Check arguments.
+ */
+ HDassert(hdr);
+
+ /* Compute information about 'huge' objects for the heap */
+
+ /* Check if we can completely hold the 'huge' object's offset & length in
+ * the file in the heap ID (which will speed up accessing it)
+ */
+ if((hdr->sizeof_addr + hdr->sizeof_size) <= (hdr->id_len - 1)) {
+ /* Indicate that v2 B-tree doesn't have to be used to locate object */
+ hdr->huge_ids_direct = TRUE;
+
+ /* Set the size of 'huge' object IDs */
+ hdr->huge_id_size = hdr->sizeof_addr + hdr->sizeof_size;
+ } /* end if */
+ else {
+ /* Indicate that v2 B-tree must be used to locate object */
+ hdr->huge_ids_direct = FALSE;
+
+ /* Set the size and maximum value of 'huge' object ID */
+ if((hdr->id_len - 1) < sizeof(hsize_t)) {
+ hdr->huge_id_size = hdr->id_len - 1;
+ hdr->huge_max_id = ((hsize_t)1 << (hdr->huge_id_size * 8)) - 1;
+ } /*end if */
+ else {
+ hdr->huge_id_size = sizeof(hsize_t);
+ hdr->huge_max_id = HSIZET_MAX;
+ } /* end else */
+ } /* end else */
+
+
+ /* Set up the v2 B-tree for tracking 'huge' objects in the heap */
+
+ /* Copy the standard v2 B-tree class */
+ HDmemcpy(&hdr->huge_bt2_class, H5HF_BTREE2, sizeof(H5B2_class_t));
+
+ /* Set the native record size for the v2 B-tree */
+ hdr->huge_bt2_class.nrec_size = sizeof(H5HF_huge_bt2_rec_t);
+
+ /* Set v2 B-tree class's "class private" pointer to the heap header */
+ hdr->huge_bt2_class.cls_private = hdr;
+
+ FUNC_LEAVE_NOAPI(SUCCEED)
+} /* end H5HF_huge_init() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5HF_huge_insert
+ *
+ * Purpose: Insert a huge object into the file and track it
+ *
+ * Return: SUCCEED/FAIL
+ *
+ * Programmer: Quincey Koziol
+ * koziol@hdfgroup.org
+ * Aug 7 2006
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5HF_huge_insert(H5HF_hdr_t *hdr, hid_t dxpl_id, size_t obj_size, const void *obj,
+ void *_id)
+{
+ H5HF_huge_bt2_rec_t obj_rec; /* Record for tracking object */
+ uint8_t *id = (uint8_t *)_id; /* Pointer to ID buffer */
+ haddr_t obj_addr; /* Address of object in the file */
+ herr_t ret_value = SUCCEED; /* Return value */
+
+ FUNC_ENTER_NOAPI_NOINIT(H5HF_huge_insert)
+#ifdef QAK
+HDfprintf(stderr, "%s: obj_size = %Zu\n", FUNC, obj_size);
+#endif /* QAK */
+
+ /*
+ * Check arguments.
+ */
+ HDassert(hdr);
+ HDassert(obj_size > hdr->max_man_size);
+ HDassert(obj);
+ HDassert(id);
+
+ /* Check if the v2 B-tree for tracking 'huge' heap objects has been created yet */
+ if(!H5F_addr_defined(hdr->huge_bt2_addr))
+ if(H5HF_huge_bt2_create(hdr, dxpl_id) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTCREATE, FAIL, "can't create v2 B-tree for tracking 'huge' heap objects")
+
+ /* Allocate space in the file for storing the 'huge' object */
+ if(HADDR_UNDEF == (obj_addr = H5MF_alloc(hdr->f, H5FD_MEM_FHEAP_HUGE_OBJ, dxpl_id, (hsize_t)obj_size)))
+ HGOTO_ERROR(H5E_HEAP, H5E_NOSPACE, FAIL, "file allocation failed for fractal heap huge object")
+
+ /* Write the object's data to disk */
+ if(H5F_block_write(hdr->f, H5FD_MEM_FHEAP_HUGE_OBJ, obj_addr, obj_size, dxpl_id, obj) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_WRITEERROR, FAIL, "writing 'huge' object to file failed")
+
+ /* Initialize shared part of record for tracking object in v2 B-tree */
+ obj_rec.addr = obj_addr;
+ obj_rec.len = obj_size;
+
+ /* If the 'huge' object will be indirectly accessed, through the v2 B-tree,
+ * create an ID for it, otherwise put a zero in for ID
+ */
+ if(hdr->huge_ids_direct)
+ obj_rec.id = 0;
+ else {
+ /* Check for wrapping around 'huge' object ID space */
+ if(hdr->huge_ids_wrapped)
+ /* Fail for now - eventually should iterate through v2 B-tree, looking for available ID */
+ HGOTO_ERROR(H5E_HEAP, H5E_UNSUPPORTED, FAIL, "wrapping 'huge' object IDs not supported yet")
+ else {
+ /* Get new 'huge' object ID to use for object */
+ /* (avoid using ID 0) */
+ obj_rec.id = ++hdr->huge_next_id;
+
+ /* Check for wrapping 'huge' object IDs around */
+ if(hdr->huge_next_id == hdr->huge_max_id)
+ hdr->huge_ids_wrapped = TRUE;
+ } /* end else */
+ } /* end else */
+#ifdef QAK
+HDfprintf(stderr, "%s: obj_rec = {%a, %Hu, %Hu}\n", FUNC, obj_rec.addr, obj_rec.len, obj_rec.id);
+#endif /* QAK */
+
+ /* Insert record for object in v2 B-tree */
+ if(H5B2_insert(hdr->f, dxpl_id, &hdr->huge_bt2_class, hdr->huge_bt2_addr, &obj_rec) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTINSERT, FAIL, "couldn't insert object tracking record in v2 B-tree")
+
+ /* Encode ID for user */
+ *id++ = H5HF_ID_VERS_CURR | H5HF_ID_TYPE_HUGE;
+ if(hdr->huge_ids_direct) {
+ H5F_addr_encode(hdr->f, &id, obj_addr);
+ H5F_ENCODE_LENGTH(hdr->f, id, (hsize_t)obj_size);
+ } /* end if */
+ else
+ UINT64ENCODE_VAR(id, obj_rec.id, hdr->huge_id_size)
+
+ /* Update statistics about heap */
+ hdr->huge_size += obj_size;
+ hdr->huge_nobjs++;
+
+ /* Mark heap header as modified */
+ if(H5HF_hdr_dirty(hdr) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTDIRTY, FAIL, "can't mark heap header as dirty")
+
+done:
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* end H5HF_huge_insert() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5HF_huge_get_obj_len
+ *
+ * Purpose: Get the size of a 'huge' object in a fractal heap
+ *
+ * Return: SUCCEED/FAIL
+ *
+ * Programmer: Quincey Koziol
+ * koziol@hdfgroup.org
+ * Aug 8 2006
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5HF_huge_get_obj_len(H5HF_hdr_t *hdr, hid_t dxpl_id, const uint8_t *id,
+ size_t *obj_len_p)
+{
+ herr_t ret_value = SUCCEED; /* Return value */
+
+ FUNC_ENTER_NOAPI(H5HF_huge_get_obj_len, FAIL)
+
+ /*
+ * Check arguments.
+ */
+ HDassert(hdr);
+ HDassert(H5F_addr_defined(hdr->huge_bt2_addr));
+ HDassert(id);
+ HDassert(obj_len_p);
+
+ /* Check if 'huge' object ID encodes address & length directly */
+ if(hdr->huge_ids_direct) {
+ /* Skip over object offset in file */
+ id += hdr->sizeof_addr;
+
+ /* Retrieve the object's length */
+ H5F_DECODE_LENGTH(hdr->f, id, *obj_len_p);
+ } /* end if */
+ else {
+ H5HF_huge_bt2_rec_t found_rec; /* Record found from tracking object */
+ H5HF_huge_bt2_rec_t search_rec; /* Record for searching for object */
+
+ /* Get ID for looking up 'huge' object in v2 B-tree */
+ UINT64DECODE_VAR(id, search_rec.id, hdr->huge_id_size)
+
+ /* Look up object in v2 B-tree */
+ if(H5B2_find(hdr->f, dxpl_id, &hdr->huge_bt2_class, hdr->huge_bt2_addr,
+ &search_rec, H5HF_huge_bt2_found, &found_rec) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_NOTFOUND, FAIL, "can't find object in B-tree")
+
+ /* Retrieve the object's length */
+ *obj_len_p = (size_t)found_rec.len;
+ } /* end else */
+
+done:
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* end H5HF_huge_get_obj_len() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5HF_huge_read
+ *
+ * Purpose: Read a 'huge' object from the heap
+ *
+ * Return: SUCCEED/FAIL
+ *
+ * Programmer: Quincey Koziol
+ * koziol@hdfgroup.org
+ * Aug 8 2006
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5HF_huge_read(H5HF_hdr_t *hdr, hid_t dxpl_id, const uint8_t *id, void *obj)
+{
+ haddr_t obj_addr; /* Object's address in the file */
+ hsize_t obj_size; /* Object's size in the file */
+ herr_t ret_value = SUCCEED; /* Return value */
+
+ FUNC_ENTER_NOAPI_NOINIT(H5HF_huge_read)
+
+ /*
+ * Check arguments.
+ */
+ HDassert(hdr);
+ HDassert(id);
+ HDassert(obj);
+
+ /* Check for 'huge' object ID that encodes address & length directly */
+ if(hdr->huge_ids_direct) {
+ /* Retrieve the object's address and length */
+ H5F_addr_decode(hdr->f, &id, &obj_addr);
+ H5F_DECODE_LENGTH(hdr->f, id, obj_size);
+ } /* end if */
+ else {
+ H5HF_huge_bt2_rec_t found_rec; /* Record found from tracking object */
+ H5HF_huge_bt2_rec_t search_rec; /* Record for searching for object */
+
+ /* Get ID for looking up 'huge' object in v2 B-tree */
+ UINT64DECODE_VAR(id, search_rec.id, hdr->huge_id_size)
+
+ /* Look up object in v2 B-tree */
+ if(H5B2_find(hdr->f, dxpl_id, &hdr->huge_bt2_class, hdr->huge_bt2_addr,
+ &search_rec, H5HF_huge_bt2_found, &found_rec) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_NOTFOUND, FAIL, "can't find object in B-tree")
+
+ /* Retrieve the object's address & length */
+ obj_addr = found_rec.addr;
+ obj_size = found_rec.len;
+ } /* end else */
+
+ /* Read the object's data from the file */
+ if (H5F_block_read(hdr->f, H5FD_MEM_FHEAP_HUGE_OBJ, obj_addr, (size_t)obj_size, dxpl_id, obj) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_READERROR, FAIL, "can't read 'huge' object's data from the file")
+
+done:
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* end H5HF_huge_read() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5HF_huge_remove
+ *
+ * Purpose: Remove a 'huge' object from the file and the v2 B-tree tracker
+ *
+ * Return: SUCCEED/FAIL
+ *
+ * Programmer: Quincey Koziol
+ * koziol@hdfgroup.org
+ * Aug 8 2006
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5HF_huge_remove(H5HF_hdr_t *hdr, hid_t dxpl_id, const uint8_t *id)
+{
+ H5HF_huge_bt2_rec_t search_rec; /* Record for searching for object */
+ H5HF_huge_remove_ud1_t udata; /* User callback data for v2 B-tree remove call */
+ herr_t ret_value = SUCCEED; /* Return value */
+
+ FUNC_ENTER_NOAPI_NOINIT(H5HF_huge_remove)
+
+ /*
+ * Check arguments.
+ */
+ HDassert(hdr);
+ HDassert(id);
+
+ /* Check for 'huge' object ID that encodes address & length directly */
+ if(hdr->huge_ids_direct) {
+ /* Retrieve the object's address and length */
+ /* (used as key in v2 B-tree record) */
+ H5F_addr_decode(hdr->f, &id, &search_rec.addr);
+ H5F_DECODE_LENGTH(hdr->f, id, search_rec.len);
+ } /* end if */
+ else
+ /* Get ID for looking up 'huge' object in v2 B-tree */
+ UINT64DECODE_VAR(id, search_rec.id, hdr->huge_id_size)
+
+ /* Set up the callback info */
+ udata.hdr = hdr;
+ udata.dxpl_id = dxpl_id;
+
+ /* Remove the record for tracking the 'huge' object from the v2 B-tree */
+ /* (space in the file for the object is freed in the 'remove' callback) */
+ if(H5B2_remove(hdr->f, dxpl_id, &hdr->huge_bt2_class, hdr->huge_bt2_addr,
+ &search_rec, H5HF_huge_bt2_remove, &udata) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTREMOVE, FAIL, "can't remove object from B-tree")
+
+ /* Update statistics about heap */
+ hdr->huge_size -= udata.obj_len;
+ hdr->huge_nobjs--;
+
+ /* Mark heap header as modified */
+ if(H5HF_hdr_dirty(hdr) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTDIRTY, FAIL, "can't mark heap header as dirty")
+
+done:
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* end H5HF_huge_remove() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5HF_huge_term
+ *
+ * Purpose: Shut down the information for tracking 'huge' objects
+ *
+ * Return: SUCCEED/FAIL
+ *
+ * Programmer: Quincey Koziol
+ * koziol@hdfgroup.org
+ * Aug 8 2006
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5HF_huge_term(H5HF_hdr_t *hdr, hid_t dxpl_id)
+{
+ herr_t ret_value = SUCCEED; /* Return value */
+
+ FUNC_ENTER_NOAPI_NOINIT(H5HF_huge_term)
+
+ /*
+ * Check arguments.
+ */
+ HDassert(hdr);
+
+ /* Check if there are no more 'huge' objects in the heap and delete the
+ * v2 B-tree that tracks them, if so
+ */
+ if(H5F_addr_defined(hdr->huge_bt2_addr) && hdr->huge_nobjs == 0) {
+ /* Sanity check */
+ HDassert(hdr->huge_size == 0);
+
+ /* Delete the v2 B-tree */
+ if(H5B2_delete(hdr->f, dxpl_id, &hdr->huge_bt2_class, hdr->huge_bt2_addr, NULL, NULL) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTDELETE, FAIL, "can't delete v2 B-tree")
+
+ /* Reset the information about 'huge' objects in the file */
+ hdr->huge_bt2_addr = HADDR_UNDEF;
+ hdr->huge_next_id = 0;
+ hdr->huge_ids_wrapped = FALSE;
+
+ /* Mark heap header as modified */
+ if(H5HF_hdr_dirty(hdr) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTDIRTY, FAIL, "can't mark heap header as dirty")
+ } /* end if */
+
+done:
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* end H5HF_huge_term() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5HF_huge_delete
+ *
+ * Purpose: Delete all the 'huge' objects in the heap, and the v2 B-tree
+ * tracker for them
+ *
+ * Return: SUCCEED/FAIL
+ *
+ * Programmer: Quincey Koziol
+ * koziol@hdfgroup.org
+ * Aug 8 2006
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5HF_huge_delete(H5HF_hdr_t *hdr, hid_t dxpl_id)
+{
+ H5HF_huge_remove_ud1_t udata; /* User callback data for v2 B-tree remove call */
+ herr_t ret_value = SUCCEED; /* Return value */
+
+ FUNC_ENTER_NOAPI_NOINIT(H5HF_huge_delete)
+
+ /*
+ * Check arguments.
+ */
+ HDassert(hdr);
+ HDassert(H5F_addr_defined(hdr->huge_bt2_addr));
+ HDassert(hdr->huge_nobjs);
+ HDassert(hdr->huge_size);
+
+ /* Set up the callback info */
+ udata.hdr = hdr;
+ udata.dxpl_id = dxpl_id;
+
+ /* Delete the v2 B-tree */
+ if(H5B2_delete(hdr->f, dxpl_id, &hdr->huge_bt2_class, hdr->huge_bt2_addr, H5HF_huge_bt2_remove, &udata) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTDELETE, FAIL, "can't delete v2 B-tree")
+
+done:
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* end H5HF_huge_delete() */
+
diff --git a/src/H5HFint.c b/src/H5HFint.c
index a8441ea..5fae177 100644
--- a/src/H5HFint.c
+++ b/src/H5HFint.c
@@ -14,7 +14,7 @@
/*-------------------------------------------------------------------------
*
- * Created: H5HFint.c
+ * Created: H5HFman.c
* Feb 24 2006
* Quincey Koziol <koziol@ncsa.uiuc.edu>
*
@@ -206,64 +206,6 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5HF_man_find
- *
- * Purpose: Find space for an object in a managed obj. heap
- *
- * Return: Non-negative on success (with direct block info
- * filled in), negative on failure
- *
- * Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
- * Mar 13 2006
- *
- *-------------------------------------------------------------------------
- */
-herr_t
-H5HF_man_find(H5HF_hdr_t *hdr, hid_t dxpl_id, size_t request,
- H5HF_free_section_t **sec_node/*out*/)
-{
- htri_t node_found; /* Whether an existing free list node was found */
- herr_t ret_value = SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI_NOINIT(H5HF_man_find)
-#ifdef QAK
-HDfprintf(stderr, "%s: request = %Zu\n", FUNC, request);
-#endif /* QAK */
-
- /*
- * Check arguments.
- */
- HDassert(hdr);
- HDassert(request > 0);
- HDassert(sec_node);
-
- /* Look for free space */
- if((node_found = H5HF_space_find(hdr, dxpl_id, (hsize_t)request, sec_node)) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTALLOC, FAIL, "can't locate free space in fractal heap")
-#ifdef QAK
-HDfprintf(stderr, "%s: After H5HF_space_find(), node_found = %t\n", FUNC, node_found);
-#endif /* QAK */
-
- /* If we didn't find a node, go create a direct block big enough to hold the requested block */
- if(!node_found)
- /* Allocate direct block big enough to hold requested size */
- if(H5HF_man_dblock_new(hdr, dxpl_id, request, sec_node) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTCREATE, FAIL, "can't create fractal heap direct block")
-
- HDassert(*sec_node);
-#ifdef QAK
-HDfprintf(stderr, "%s: (*sec_node)->sect_info.addr = %a\n", FUNC, (*sec_node)->sect_info.addr);
-HDfprintf(stderr, "%s: (*sec_node)->sect_info.size = %Hu\n", FUNC, (*sec_node)->sect_info.size);
-HDfprintf(stderr, "%s: (*sec_node)->sect_info.type = %u\n", FUNC, (*sec_node)->sect_info.type);
-#endif /* QAK */
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5HF_man_find() */
-
-
-/*-------------------------------------------------------------------------
* Function: H5HF_man_insert
*
* Purpose: Insert an object in a managed direct block
@@ -277,13 +219,15 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5HF_man_insert(H5HF_hdr_t *hdr, hid_t dxpl_id, H5HF_free_section_t *sec_node,
- size_t obj_size, const void *obj, void *_id)
+H5HF_man_insert(H5HF_hdr_t *hdr, hid_t dxpl_id, size_t obj_size, const void *obj,
+ void *_id)
{
+ H5HF_free_section_t *sec_node; /* Pointer to free space section */
H5HF_direct_t *dblock = NULL; /* Pointer to direct block to modify */
haddr_t dblock_addr = HADDR_UNDEF; /* Direct block address */
uint8_t *id = (uint8_t *)_id; /* Pointer to ID buffer */
size_t blk_off; /* Offset of object within block */
+ htri_t node_found; /* Whether an existing free list node was found */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT(H5HF_man_insert)
@@ -299,6 +243,19 @@ HDfprintf(stderr, "%s: obj_size = %Zu\n", FUNC, obj_size);
HDassert(obj);
HDassert(id);
+ /* Look for free space */
+ if((node_found = H5HF_space_find(hdr, dxpl_id, (hsize_t)obj_size, &sec_node)) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTALLOC, FAIL, "can't locate free space in fractal heap")
+#ifdef QAK
+HDfprintf(stderr, "%s: After H5HF_space_find(), node_found = %t\n", FUNC, node_found);
+#endif /* QAK */
+
+ /* If we didn't find a node, go create a direct block big enough to hold the requested block */
+ if(!node_found)
+ /* Allocate direct block big enough to hold requested size */
+ if(H5HF_man_dblock_new(hdr, dxpl_id, obj_size, &sec_node) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTCREATE, FAIL, "can't create fractal heap direct block")
+
/* Check for row section */
if(sec_node->sect_info.type == H5HF_FSPACE_SECT_FIRST_ROW ||
sec_node->sect_info.type == H5HF_FSPACE_SECT_NORMAL_ROW) {
@@ -318,7 +275,7 @@ HDfprintf(stderr, "%s: sec_node->u.row.num_entries = %u\n", FUNC, sec_node->u.ro
} /* end if */
HDassert(sec_node->sect_info.type == H5HF_FSPACE_SECT_SINGLE);
- /* Check for serialized 'single' section */
+ /* Check for 'single' section being serialized */
if(sec_node->sect_info.state == H5FS_SECT_SERIALIZED) {
if(H5HF_sect_single_revive(hdr, dxpl_id, sec_node) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't revive single free section")
@@ -417,9 +374,11 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5HF_man_read(H5HF_hdr_t *hdr, hid_t dxpl_id, hsize_t obj_off, size_t obj_len, void *obj)
+H5HF_man_read(H5HF_hdr_t *hdr, hid_t dxpl_id, const uint8_t *id, void *obj)
{
H5HF_direct_t *dblock; /* Pointer to direct block to query */
+ hsize_t obj_off; /* Object's offset in heap */
+ size_t obj_len; /* Object's length in heap */
size_t blk_off; /* Offset of object in block */
uint8_t *p; /* Temporary pointer to obj info in block */
haddr_t dblock_addr; /* Direct block address */
@@ -427,17 +386,22 @@ H5HF_man_read(H5HF_hdr_t *hdr, hid_t dxpl_id, hsize_t obj_off, size_t obj_len, v
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT(H5HF_man_read)
-#ifdef QAK
-HDfprintf(stderr, "%s: obj_off = %Hu, obj_len = %Zu\n", FUNC, obj_off, obj_len);
-#endif /* QAK */
/*
* Check arguments.
*/
HDassert(hdr);
+ HDassert(id);
+ HDassert(obj);
+
+ /* Decode the object offset within the heap & it's length */
+ UINT64DECODE_VAR(id, obj_off, hdr->heap_off_size);
+ UINT64DECODE_VAR(id, obj_len, hdr->heap_len_size);
+#ifdef QAK
+HDfprintf(stderr, "%s: obj_off = %Hu, obj_len = %Zu\n", FUNC, obj_off, obj_len);
+#endif /* QAK */
HDassert(obj_off > 0);
HDassert(obj_len > 0);
- HDassert(obj);
/* Check for root direct block */
if(hdr->man_dtable.curr_root_rows == 0) {
@@ -511,24 +475,34 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5HF_man_remove(H5HF_hdr_t *hdr, hid_t dxpl_id, hsize_t obj_off, size_t obj_len)
+H5HF_man_remove(H5HF_hdr_t *hdr, hid_t dxpl_id, const uint8_t *id)
{
H5HF_free_section_t *sec_node; /* Pointer to free space section for block */
H5HF_direct_t *dblock; /* Pointer to direct block to query */
+ hsize_t obj_off; /* Object's offset in heap */
+ size_t obj_len; /* Object's length in heap */
haddr_t dblock_addr; /* Direct block address */
size_t dblock_size; /* Direct block size */
size_t blk_off; /* Offset of object in block */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT(H5HF_man_remove)
-#ifdef QAK
-HDfprintf(stderr, "%s: obj_off = %Hu, obj_len = %Zu\n", FUNC, obj_off, obj_len);
-#endif /* QAK */
/*
* Check arguments.
*/
HDassert(hdr);
+ HDassert(id);
+
+ /* Decode the object offset within the heap & it's length */
+#ifdef QAK
+HDfprintf(stderr, "%s: fh->hdr->heap_off_size = %u, fh->hdr->heap_len_size = %u\n", FUNC, (unsigned)fh->hdr->heap_off_size, (unsigned)fh->hdr->heap_len_size);
+#endif /* QAK */
+ UINT64DECODE_VAR(id, obj_off, hdr->heap_off_size);
+ UINT64DECODE_VAR(id, obj_len, hdr->heap_len_size);
+#ifdef QAK
+HDfprintf(stderr, "%s: obj_off = %Hu, obj_len = %Zu\n", FUNC, obj_off, obj_len);
+#endif /* QAK */
HDassert(obj_off > 0);
HDassert(obj_len > 0);
diff --git a/src/H5HFpkg.h b/src/H5HFpkg.h
index cddf981..14d16ea 100644
--- a/src/H5HFpkg.h
+++ b/src/H5HFpkg.h
@@ -32,6 +32,7 @@
/* Other private headers needed by this file */
#include "H5ACprivate.h" /* Metadata cache */
+#include "H5B2private.h" /* v2 B-trees */
#include "H5FLprivate.h" /* Free Lists */
#include "H5FSprivate.h" /* File free space */
#include "H5SLprivate.h" /* Skip lists */
@@ -296,7 +297,7 @@ typedef struct H5HF_hdr_t {
hbool_t debug_objs; /* Is the heap storing objects in 'debug' format */
hbool_t have_io_filter; /* Does the heap have I/O filters for the direct blocks? */
hbool_t write_once; /* Is heap being written in "write once" mode? */
- hbool_t huge_ids_wrapped; /* Have "huge" object IDs wrapped around? */
+ hbool_t huge_ids_wrapped; /* Have "huge" object IDs wrapped around? */
/* Doubling table information (partially stored in header) */
/* (Partially set by user, partially derived/updated internally) */
@@ -308,8 +309,8 @@ typedef struct H5HF_hdr_t {
/* "Huge" object support (stored in header) */
uint32_t max_man_size; /* Max. size of object to manage in doubling table */
- hsize_t huge_next_id; /* Next ID to use for "huge" object */
- haddr_t huge_bt_addr; /* Address of B-tree for storing "huge" object info */
+ hsize_t huge_next_id; /* Next ID to use for indirectly tracked 'huge' object */
+ haddr_t huge_bt2_addr; /* Address of v2 B-tree for tracking "huge" object info */
/* Statistics for heap (stored in header) */
hsize_t man_size; /* Total amount of managed space in heap */
@@ -330,6 +331,10 @@ typedef struct H5HF_hdr_t {
size_t id_len; /* Size of heap IDs (in bytes) */
H5FS_t *fspace; /* Free space list for objects in heap */
H5HF_block_iter_t next_block; /* Block iterator for searching for next block with space */
+ H5B2_class_t huge_bt2_class; /* v2 B-tree class information for "huge" object tracking */
+ hsize_t huge_max_id; /* Max. 'huge' heap ID before rolling 'huge' heap IDs over */
+ hbool_t huge_ids_direct; /* Flag to indicate that 'huge' object's offset & length are stored directly in heap ID */
+ unsigned char huge_id_size; /* Size of 'huge' heap IDs (in bytes) */
unsigned char heap_off_size; /* Size of heap offsets (in bytes) */
unsigned char heap_len_size; /* Size of heap ID lengths (in bytes) */
} H5HF_hdr_t;
@@ -396,7 +401,21 @@ typedef struct H5HF_parent_t {
typedef struct {
H5HF_hdr_t *hdr; /* Fractal heap header */
hid_t dxpl_id; /* DXPL ID for operation */
-} H5HF_add_ud1_t;
+} H5HF_sect_add_ud1_t;
+
+/* User data for v2 B-tree 'remove' callback on 'huge' objects */
+typedef struct {
+ H5HF_hdr_t *hdr; /* Fractal heap header (in) */
+ hid_t dxpl_id; /* DXPL ID for operation (in) */
+ hsize_t obj_len; /* Length of object removed (out) */
+} H5HF_huge_remove_ud1_t;
+
+/* Typedef for 'huge' object's records in the v2 B-tree */
+typedef struct H5HF_huge_bt2_rec_t {
+ haddr_t addr; /* Address of the object in the file */
+ hsize_t len; /* Length of the object in the file */
+ hsize_t id; /* ID used for object (not used for 'huge' objects directly accessed) */
+} H5HF_huge_bt2_rec_t;
/*****************************/
/* Package Private Variables */
@@ -516,19 +535,27 @@ H5_DLL H5HF_direct_t *H5HF_man_dblock_protect(H5HF_hdr_t *hdr, hid_t dxpl_id,
H5_DLL herr_t H5HF_man_dblock_delete(H5F_t *f, hid_t dxpl_id, haddr_t dblock_addr,
hsize_t dblock_size);
-/* Routines for internal operations */
+/* Managed object routines */
H5_DLL herr_t H5HF_man_locate_block(H5HF_hdr_t *hdr, hid_t dxpl_id,
hsize_t obj_off, hbool_t locate_indirect, H5HF_indirect_t **par_iblock,
unsigned *par_entry, H5AC_protect_t rw);
-H5_DLL herr_t H5HF_man_find(H5HF_hdr_t *fh, hid_t dxpl_id, size_t request,
- H5HF_free_section_t **sec_node/*out*/);
-H5_DLL herr_t H5HF_man_insert(H5HF_hdr_t *fh, hid_t dxpl_id,
- H5HF_free_section_t *sec_node, size_t obj_size, const void *obj,
- void *id);
-H5_DLL herr_t H5HF_man_read(H5HF_hdr_t *fh, hid_t dxpl_id, hsize_t obj_off,
- size_t obj_len, void *obj);
-H5_DLL herr_t H5HF_man_remove(H5HF_hdr_t *hdr, hid_t dxpl_id, hsize_t obj_off,
- size_t obj_len);
+H5_DLL herr_t H5HF_man_insert(H5HF_hdr_t *fh, hid_t dxpl_id, size_t obj_size,
+ const void *obj, void *id);
+H5_DLL herr_t H5HF_man_read(H5HF_hdr_t *fh, hid_t dxpl_id, const uint8_t *id,
+ void *obj);
+H5_DLL herr_t H5HF_man_remove(H5HF_hdr_t *hdr, hid_t dxpl_id, const uint8_t *id);
+
+/* "Huge" object routines */
+H5_DLL herr_t H5HF_huge_init(H5HF_hdr_t *hdr);
+H5_DLL herr_t H5HF_huge_insert(H5HF_hdr_t *hdr, hid_t dxpl_id, size_t obj_size,
+ const void *obj, void *id);
+H5_DLL herr_t H5HF_huge_get_obj_len(H5HF_hdr_t *hdr, hid_t dxpl_id,
+ const uint8_t *id, size_t *obj_len_p);
+H5_DLL herr_t H5HF_huge_read(H5HF_hdr_t *fh, hid_t dxpl_id, const uint8_t *id,
+ void *obj);
+H5_DLL herr_t H5HF_huge_remove(H5HF_hdr_t *fh, hid_t dxpl_id, const uint8_t *id);
+H5_DLL herr_t H5HF_huge_term(H5HF_hdr_t *hdr, hid_t dxpl_id);
+H5_DLL herr_t H5HF_huge_delete(H5HF_hdr_t *hdr, hid_t dxpl_id);
/* Metadata cache callbacks */
H5_DLL herr_t H5HF_cache_hdr_dest(H5F_t *f, H5HF_hdr_t *hdr);
diff --git a/src/H5HFprivate.h b/src/H5HFprivate.h
index 85e0cf6..3461500 100644
--- a/src/H5HFprivate.h
+++ b/src/H5HFprivate.h
@@ -91,7 +91,8 @@ H5_DLL herr_t H5HF_get_id_len(H5HF_t *fh, size_t *id_len_p/*out*/);
H5_DLL herr_t H5HF_get_heap_addr(H5HF_t *fh, haddr_t *heap_addr);
H5_DLL herr_t H5HF_insert(H5HF_t *fh, hid_t dxpl_id, size_t size,
const void *obj, void *id/*out*/);
-H5_DLL herr_t H5HF_get_obj_len(H5HF_t *fh, const void *id, size_t *obj_len_p/*out*/);
+H5_DLL herr_t H5HF_get_obj_len(H5HF_t *fh, hid_t dxpl_id, const void *id,
+ size_t *obj_len_p/*out*/);
H5_DLL herr_t H5HF_read(H5HF_t *fh, hid_t dxpl_id, const void *id,
void *obj/*out*/);
H5_DLL herr_t H5HF_remove(H5HF_t *fh, hid_t dxpl_id, const void *id);
diff --git a/src/H5HFsection.c b/src/H5HFsection.c
index 8550a47..2614f8b 100644
--- a/src/H5HFsection.c
+++ b/src/H5HFsection.c
@@ -758,7 +758,7 @@ H5HF_sect_single_add(H5FS_section_info_t *_sect, unsigned *flags, void *_udata)
*/
if(!(*flags & H5FS_ADD_DESERIALIZING)) {
H5HF_free_section_t *sect = (H5HF_free_section_t *)_sect; /* Fractal heap free section */
- H5HF_add_ud1_t *udata = (H5HF_add_ud1_t *)_udata; /* User callback data */
+ H5HF_sect_add_ud1_t *udata = (H5HF_sect_add_ud1_t *)_udata; /* User callback data */
H5HF_hdr_t *hdr = udata->hdr; /* Fractal heap header */
hid_t dxpl_id = udata->dxpl_id; /* DXPL ID for operation */
@@ -899,7 +899,7 @@ H5HF_sect_single_merge(H5FS_section_info_t *_sect1, H5FS_section_info_t *_sect2,
{
H5HF_free_section_t *sect1 = (H5HF_free_section_t *)_sect1; /* Fractal heap free section */
H5HF_free_section_t *sect2 = (H5HF_free_section_t *)_sect2; /* Fractal heap free section */
- H5HF_add_ud1_t *udata = (H5HF_add_ud1_t *)_udata; /* User callback data */
+ H5HF_sect_add_ud1_t *udata = (H5HF_sect_add_ud1_t *)_udata; /* User callback data */
H5HF_hdr_t *hdr = udata->hdr; /* Fractal heap header */
hid_t dxpl_id = udata->dxpl_id; /* DXPL ID for operation */
herr_t ret_value = SUCCEED; /* Return value */
@@ -962,7 +962,7 @@ static htri_t
H5HF_sect_single_can_shrink(const H5FS_section_info_t *_sect, void *_udata)
{
const H5HF_free_section_t *sect = (const H5HF_free_section_t *)_sect; /* Fractal heap free section */
- H5HF_add_ud1_t *udata = (H5HF_add_ud1_t *)_udata; /* User callback data */
+ H5HF_sect_add_ud1_t *udata = (H5HF_sect_add_ud1_t *)_udata; /* User callback data */
H5HF_hdr_t *hdr = udata->hdr; /* Fractal heap header */
htri_t ret_value = FALSE; /* Return value */
@@ -1026,7 +1026,7 @@ static herr_t
H5HF_sect_single_shrink(H5FS_section_info_t **_sect, void UNUSED *_udata)
{
H5HF_free_section_t **sect = (H5HF_free_section_t **)_sect; /* Fractal heap free section */
- H5HF_add_ud1_t *udata = (H5HF_add_ud1_t *)_udata; /* User callback data */
+ H5HF_sect_add_ud1_t *udata = (H5HF_sect_add_ud1_t *)_udata; /* User callback data */
H5HF_hdr_t *hdr = udata->hdr; /* Fractal heap header */
hid_t dxpl_id = udata->dxpl_id; /* DXPL ID for operation */
H5HF_direct_t *dblock; /* Pointer to direct block for section */
@@ -1768,7 +1768,7 @@ H5HF_sect_row_merge(H5FS_section_info_t *_sect1, H5FS_section_info_t *_sect2,
{
H5HF_free_section_t *sect1 = (H5HF_free_section_t *)_sect1; /* Fractal heap free section */
H5HF_free_section_t *sect2 = (H5HF_free_section_t *)_sect2; /* Fractal heap free section */
- H5HF_add_ud1_t *udata = (H5HF_add_ud1_t *)_udata; /* User callback data */
+ H5HF_sect_add_ud1_t *udata = (H5HF_sect_add_ud1_t *)_udata; /* User callback data */
H5HF_hdr_t *hdr = udata->hdr; /* Fractal heap header */
hid_t dxpl_id = udata->dxpl_id; /* DXPL ID for operation */
herr_t ret_value = SUCCEED; /* Return value */
@@ -1847,7 +1847,7 @@ static htri_t
H5HF_sect_row_can_shrink(const H5FS_section_info_t *_sect, void UNUSED *_udata)
{
const H5HF_free_section_t *sect = (const H5HF_free_section_t *)_sect; /* Fractal heap free section */
- H5HF_add_ud1_t *udata = (H5HF_add_ud1_t *)_udata; /* User callback data */
+ H5HF_sect_add_ud1_t *udata = (H5HF_sect_add_ud1_t *)_udata; /* User callback data */
H5HF_hdr_t *hdr = udata->hdr; /* Fractal heap header */
htri_t ret_value = FALSE; /* Return value */
@@ -1893,7 +1893,7 @@ H5HF_sect_row_shrink(H5FS_section_info_t **_sect, void *_udata)
{
H5HF_free_section_t **sect = (H5HF_free_section_t **)_sect; /* Fractal heap free section */
H5HF_free_section_t *top_indir_sect; /* Top indirect section for row */
- H5HF_add_ud1_t *udata = (H5HF_add_ud1_t *)_udata; /* User callback data */
+ H5HF_sect_add_ud1_t *udata = (H5HF_sect_add_ud1_t *)_udata; /* User callback data */
H5HF_hdr_t *hdr = udata->hdr; /* Fractal heap header */
hid_t dxpl_id = udata->dxpl_id; /* DXPL ID for operation */
herr_t ret_value = SUCCEED; /* Return value */
diff --git a/src/H5HFspace.c b/src/H5HFspace.c
index 0cc6c12..65f427f 100644
--- a/src/H5HFspace.c
+++ b/src/H5HFspace.c
@@ -156,7 +156,7 @@ herr_t
H5HF_space_add(H5HF_hdr_t *hdr, hid_t dxpl_id, H5HF_free_section_t *node,
unsigned flags)
{
- H5HF_add_ud1_t udata; /* User data for free space manager 'add' */
+ H5HF_sect_add_ud1_t udata; /* User data for free space manager 'add' */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT(H5HF_space_add)
diff --git a/src/Makefile.am b/src/Makefile.am
index 4b7995d..ff9165a 100755
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -51,8 +51,8 @@ libhdf5_la_SOURCES= H5.c H5dbg.c H5A.c H5AC.c H5B.c H5Bcache.c \
H5FDstream.c H5FL.c H5FO.c H5FS.c H5FScache.c H5FSdbg.c H5FSsection.c \
H5G.c H5Gdeprec.c H5Gent.c H5Glink.c H5Gloc.c H5Gname.c H5Gnode.c \
H5Gobj.c H5Goh.c H5Gstab.c H5Gtest.c H5Gtraverse.c \
- H5HF.c H5HFcache.c H5HFdbg.c H5HFdblock.c H5HFdtable.c \
- H5HFhdr.c H5HFiblock.c H5HFint.c H5HFiter.c H5HFsection.c \
+ H5HF.c H5HFbtree2.c H5HFcache.c H5HFdbg.c H5HFdblock.c H5HFdtable.c \
+ H5HFhdr.c H5HFhuge.c H5HFiblock.c H5HFiter.c H5HFint.c H5HFsection.c \
H5HFspace.c H5HFstat.c H5HFtest.c \
H5HG.c H5HGdbg.c H5HL.c H5HLdbg.c H5HP.c H5I.c H5MF.c H5MM.c \
H5MP.c H5MPtest.c H5L.c H5Lexternal.c H5O.c H5Oattr.c H5Obogus.c H5Ocache.c \
diff --git a/src/Makefile.in b/src/Makefile.in
index fe6bfd5..bda2c99 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -93,9 +93,9 @@ am_libhdf5_la_OBJECTS = H5.lo H5dbg.lo H5A.lo H5AC.lo H5B.lo \
H5FDstream.lo H5FL.lo H5FO.lo H5FS.lo H5FScache.lo H5FSdbg.lo \
H5FSsection.lo H5G.lo H5Gdeprec.lo H5Gent.lo H5Glink.lo \
H5Gloc.lo H5Gname.lo H5Gnode.lo H5Gobj.lo H5Goh.lo H5Gstab.lo \
- H5Gtest.lo H5Gtraverse.lo H5HF.lo H5HFcache.lo H5HFdbg.lo \
- H5HFdblock.lo H5HFdtable.lo H5HFhdr.lo H5HFiblock.lo \
- H5HFint.lo H5HFiter.lo H5HFsection.lo H5HFspace.lo H5HFstat.lo \
+ H5Gtest.lo H5Gtraverse.lo H5HF.lo H5HFbtree2.lo H5HFcache.lo H5HFdbg.lo \
+ H5HFdblock.lo H5HFdtable.lo H5HFhdr.lo H5HFhuge.lo H5HFiblock.lo \
+ H5HFiter.lo H5HFint.lo H5HFsection.lo H5HFspace.lo H5HFstat.lo \
H5HFtest.lo H5HG.lo H5HGdbg.lo H5HL.lo H5HLdbg.lo H5HP.lo \
H5I.lo H5MF.lo H5MM.lo H5MP.lo H5MPtest.lo H5L.lo \
H5Lexternal.lo H5O.lo H5Oattr.lo H5Obogus.lo H5Ocache.lo \
@@ -399,8 +399,8 @@ libhdf5_la_SOURCES = H5.c H5dbg.c H5A.c H5AC.c H5B.c H5Bcache.c \
H5FDstream.c H5FL.c H5FO.c H5FS.c H5FScache.c H5FSdbg.c H5FSsection.c \
H5G.c H5Gdeprec.c H5Gent.c H5Glink.c H5Gloc.c H5Gname.c H5Gnode.c \
H5Gobj.c H5Goh.c H5Gstab.c H5Gtest.c H5Gtraverse.c \
- H5HF.c H5HFcache.c H5HFdbg.c H5HFdblock.c H5HFdtable.c \
- H5HFhdr.c H5HFiblock.c H5HFint.c H5HFiter.c H5HFsection.c \
+ H5HF.c H5HFbtree2.c H5HFcache.c H5HFdbg.c H5HFdblock.c H5HFdtable.c \
+ H5HFhdr.c H5HFhuge.c H5HFiblock.c H5HFint.c H5HFiter.c H5HFsection.c \
H5HFspace.c H5HFstat.c H5HFtest.c \
H5HG.c H5HGdbg.c H5HL.c H5HLdbg.c H5HP.c H5I.c H5MF.c H5MM.c \
H5MP.c H5MPtest.c H5L.c H5Lexternal.c H5O.c H5Oattr.c H5Obogus.c H5Ocache.c \
@@ -609,11 +609,13 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Gtest.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Gtraverse.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5HF.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5HFbtree2.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5HFcache.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5HFdbg.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5HFdblock.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5HFdtable.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5HFhdr.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5HFhuge.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5HFiblock.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5HFint.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5HFiter.Plo@am__quote@
diff --git a/test/fheap.c b/test/fheap.c
index d017911..1afda73 100644
--- a/test/fheap.c
+++ b/test/fheap.c
@@ -251,11 +251,12 @@ error:
*-------------------------------------------------------------------------
*/
static int
-add_obj(H5HF_t *fh, hid_t dxpl, unsigned obj_off,
+add_obj(H5HF_t *fh, hid_t dxpl, size_t obj_off,
size_t obj_size, fheap_heap_state_t *state, fheap_heap_ids_t *keep_ids)
{
unsigned char heap_id[HEAP_ID_LEN]; /* Heap ID for object inserted */
unsigned char *obj; /* Buffer for object to insert */
+ size_t robj_size; /* Object size read in */
/* Sanity check */
HDassert(fh);
@@ -280,6 +281,10 @@ add_obj(H5HF_t *fh, hid_t dxpl, unsigned obj_off,
} /* end if */
/* Read in object */
+ if(H5HF_get_obj_len(fh, dxpl, heap_id, &robj_size) < 0)
+ FAIL_STACK_ERROR
+ if(obj_size != robj_size)
+ TEST_ERROR
if(H5HF_read(fh, dxpl, heap_id, shared_robj_g) < 0)
FAIL_STACK_ERROR
if(HDmemcmp(obj, shared_robj_g, obj_size))
@@ -449,7 +454,7 @@ open_heap(char *filename, hid_t fapl, hid_t dxpl, const H5HF_create_t *cparam,
size_t id_len; /* Size of fractal heap IDs */
/* Set the filename to use for this test (dependent on fapl) */
- h5_fixname(FILENAME[0], fapl, filename, FHEAP_FILENAME_LEN);
+ h5_fixname(FILENAME[0], fapl, filename, (size_t)FHEAP_FILENAME_LEN);
/* Create the file to work on */
if((*file = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
@@ -1653,9 +1658,9 @@ test_create(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t UNUSED *tparam
FAIL_STACK_ERROR
/*
- * Test fractal heap creation (w/absolute address mapping)
+ * Test fractal heap creation
*/
- TESTING("fractal heap creation (w/absolute address mapping)");
+ TESTING("fractal heap creation");
if(NULL == (fh = H5HF_create(f, H5P_DATASET_XFER_DEFAULT, cparam)))
FAIL_STACK_ERROR
if(H5HF_get_id_len(fh, &id_len) < 0)
@@ -1752,10 +1757,10 @@ test_reopen(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t UNUSED *tparam
STACK_ERROR
/*
- * Test fractal heap creation (w/absolute address mapping)
+ * Test fractal heap creation
*/
- TESTING("reopening existing fractal heap (w/absolute address mapping)");
+ TESTING("reopening existing fractal heap");
/* Create heap */
if(NULL == (fh = H5HF_create(f, H5P_DATASET_XFER_DEFAULT, cparam)))
@@ -1812,7 +1817,7 @@ error:
#ifdef ALL_INSERT_TESTS
/*-------------------------------------------------------------------------
- * Function: test_abs_insert_first
+ * Function: test_man_insert_first
*
* Purpose: Test inserting first object into absolute heap
*
@@ -1826,7 +1831,7 @@ error:
*-------------------------------------------------------------------------
*/
static int
-test_abs_insert_first(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
+test_man_insert_first(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
hid_t file = -1; /* File ID */
hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
@@ -1874,7 +1879,7 @@ test_abs_insert_first(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpa
state.man_size = DBLOCK_SIZE(fh, 0);
state.man_alloc_size = DBLOCK_SIZE(fh, 0);
state.man_free_space = DBLOCK_FREE(fh, 0);
- if(add_obj(fh, dxpl, 10, SMALL_OBJ_SIZE1, &state, NULL))
+ if(add_obj(fh, dxpl, (size_t)10, SMALL_OBJ_SIZE1, &state, NULL))
FAIL_STACK_ERROR
/* Check for closing & re-opening the heap */
@@ -1905,11 +1910,11 @@ error:
H5Fclose(file);
} H5E_END_TRY;
return(1);
-} /* test_abs_insert_first() */
+} /* test_man_insert_first() */
/*-------------------------------------------------------------------------
- * Function: test_abs_insert_second
+ * Function: test_man_insert_second
*
* Purpose: Test inserting two objects into absolute heap
*
@@ -1923,7 +1928,7 @@ error:
*-------------------------------------------------------------------------
*/
static int
-test_abs_insert_second(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
+test_man_insert_second(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
hid_t file = -1; /* File ID */
hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
@@ -1965,7 +1970,7 @@ test_abs_insert_second(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tp
state.man_size = DBLOCK_SIZE(fh, 0);
state.man_alloc_size = DBLOCK_SIZE(fh, 0);
state.man_free_space = DBLOCK_FREE(fh, 0);
- if(add_obj(fh, dxpl, 10, SMALL_OBJ_SIZE1, &state, NULL))
+ if(add_obj(fh, dxpl, (size_t)10, SMALL_OBJ_SIZE1, &state, NULL))
FAIL_STACK_ERROR
/* Check for closing & re-opening the heap */
@@ -1973,7 +1978,7 @@ test_abs_insert_second(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tp
TEST_ERROR
/* Insert second object */
- if(add_obj(fh, dxpl, 20, SMALL_OBJ_SIZE2, &state, NULL))
+ if(add_obj(fh, dxpl, (size_t)20, SMALL_OBJ_SIZE2, &state, NULL))
FAIL_STACK_ERROR
/* Close the fractal heap */
@@ -1996,11 +2001,11 @@ error:
H5Fclose(file);
} H5E_END_TRY;
return(1);
-} /* test_abs_insert_second() */
+} /* test_man_insert_second() */
/*-------------------------------------------------------------------------
- * Function: test_abs_insert_root_mult
+ * Function: test_man_insert_root_mult
*
* Purpose: Test inserting mult. objects into absolute heap, up to the
* limit of a root direct block
@@ -2015,7 +2020,7 @@ error:
*-------------------------------------------------------------------------
*/
static int
-test_abs_insert_root_mult(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
+test_man_insert_root_mult(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
hid_t file = -1; /* File ID */
hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
@@ -2090,11 +2095,11 @@ error:
H5Fclose(file);
} H5E_END_TRY;
return(1);
-} /* test_abs_insert_root_mult() */
+} /* test_man_insert_root_mult() */
/*-------------------------------------------------------------------------
- * Function: test_abs_insert_force_indirect
+ * Function: test_man_insert_force_indirect
*
* Purpose: Test inserting mult. objects into absolute heap, filling the
* root direct block and forcing the root block to be converted
@@ -2110,7 +2115,7 @@ error:
*-------------------------------------------------------------------------
*/
static int
-test_abs_insert_force_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
+test_man_insert_force_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
hid_t file = -1; /* File ID */
hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
@@ -2169,7 +2174,7 @@ test_abs_insert_force_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_par
state.man_size = cparam->managed.width * DBLOCK_SIZE(fh, 0);
state.man_alloc_size += DBLOCK_SIZE(fh, 0);
state.man_free_space = (cparam->managed.width - 1) * DBLOCK_FREE(fh, 0);
- if(add_obj(fh, dxpl, 10, SMALL_OBJ_SIZE1, &state, NULL))
+ if(add_obj(fh, dxpl, (size_t)10, SMALL_OBJ_SIZE1, &state, NULL))
FAIL_STACK_ERROR
/* Close the fractal heap */
@@ -2192,11 +2197,11 @@ error:
H5Fclose(file);
} H5E_END_TRY;
return(1);
-} /* test_abs_insert_force_indirect() */
+} /* test_man_insert_force_indirect() */
/*-------------------------------------------------------------------------
- * Function: test_abs_insert_fill_second
+ * Function: test_man_insert_fill_second
*
* Purpose: Test inserting mult. objects into absolute heap, filling the
* root direct block, forcing the root block to be converted
@@ -2212,7 +2217,7 @@ error:
*-------------------------------------------------------------------------
*/
static int
-test_abs_insert_fill_second(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
+test_man_insert_fill_second(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
hid_t file = -1; /* File ID */
hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
@@ -2294,11 +2299,11 @@ error:
H5Fclose(file);
} H5E_END_TRY;
return(1);
-} /* test_abs_insert_fill_second() */
+} /* test_man_insert_fill_second() */
/*-------------------------------------------------------------------------
- * Function: test_abs_insert_third_direct
+ * Function: test_man_insert_third_direct
*
* Purpose: Test inserting mult. objects into absolute heap, filling the
* root direct block, forcing the root block to be converted
@@ -2315,7 +2320,7 @@ error:
*-------------------------------------------------------------------------
*/
static int
-test_abs_insert_third_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
+test_man_insert_third_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
hid_t file = -1; /* File ID */
hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
@@ -2379,7 +2384,7 @@ test_abs_insert_third_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_param
/* Insert one more object, to force creation of third direct block */
state.man_alloc_size += DBLOCK_SIZE(fh, 0);
- if(add_obj(fh, dxpl, 10, SMALL_OBJ_SIZE1, &state, NULL))
+ if(add_obj(fh, dxpl, (size_t)10, SMALL_OBJ_SIZE1, &state, NULL))
FAIL_STACK_ERROR
/* Close the fractal heap */
@@ -2402,11 +2407,11 @@ error:
H5Fclose(file);
} H5E_END_TRY;
return(1);
-} /* test_abs_insert_third_direct() */
+} /* test_man_insert_third_direct() */
/*-------------------------------------------------------------------------
- * Function: test_abs_fill_first_row
+ * Function: test_man_fill_first_row
*
* Purpose: Test inserting mult. objects into absolute heap, creating
* enough direct blocks to fill first row of root indirect
@@ -2422,7 +2427,7 @@ error:
*-------------------------------------------------------------------------
*/
static int
-test_abs_fill_first_row(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
+test_man_fill_first_row(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
hid_t file = -1; /* File ID */
hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
@@ -2494,11 +2499,11 @@ error:
H5Fclose(file);
} H5E_END_TRY;
return(1);
-} /* test_abs_fill_first_row() */
+} /* test_man_fill_first_row() */
/*-------------------------------------------------------------------------
- * Function: test_abs_start_second_row
+ * Function: test_man_start_second_row
*
* Purpose: Test inserting mult. objects into absolute heap, creating
* enough direct blocks to fill first row of root indirect
@@ -2514,7 +2519,7 @@ error:
*-------------------------------------------------------------------------
*/
static int
-test_abs_start_second_row(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
+test_man_start_second_row(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
hid_t file = -1; /* File ID */
hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
@@ -2570,7 +2575,7 @@ test_abs_start_second_row(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t
state.man_size += cparam->managed.width * DBLOCK_SIZE(fh, 1);
state.man_alloc_size += DBLOCK_SIZE(fh, 1);
state.man_free_space = cparam->managed.width * DBLOCK_FREE(fh, 1);
- if(add_obj(fh, dxpl, 10, SMALL_OBJ_SIZE1, &state, NULL))
+ if(add_obj(fh, dxpl, (size_t)10, SMALL_OBJ_SIZE1, &state, NULL))
FAIL_STACK_ERROR
/* Close the fractal heap */
@@ -2593,11 +2598,11 @@ error:
H5Fclose(file);
} H5E_END_TRY;
return(1);
-} /* test_abs_start_second_row() */
+} /* test_man_start_second_row() */
/*-------------------------------------------------------------------------
- * Function: test_abs_fill_second_row
+ * Function: test_man_fill_second_row
*
* Purpose: Test inserting mult. objects into absolute heap, creating
* enough direct blocks to fill first row of root indirect
@@ -2613,7 +2618,7 @@ error:
*-------------------------------------------------------------------------
*/
static int
-test_abs_fill_second_row(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
+test_man_fill_second_row(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
hid_t file = -1; /* File ID */
hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
@@ -2689,11 +2694,11 @@ error:
H5Fclose(file);
} H5E_END_TRY;
return(1);
-} /* test_abs_fill_second_row() */
+} /* test_man_fill_second_row() */
/*-------------------------------------------------------------------------
- * Function: test_abs_start_third_row
+ * Function: test_man_start_third_row
*
* Purpose: Test inserting mult. objects into absolute heap, creating
* enough direct blocks to fill first row of root indirect
@@ -2710,7 +2715,7 @@ error:
*-------------------------------------------------------------------------
*/
static int
-test_abs_start_third_row(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
+test_man_start_third_row(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
hid_t file = -1; /* File ID */
hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
@@ -2773,7 +2778,7 @@ test_abs_start_third_row(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *
state.man_alloc_size += DBLOCK_SIZE(fh, 2);
state.man_free_space += cparam->managed.width * DBLOCK_FREE(fh, 2);
state.man_free_space += cparam->managed.width * DBLOCK_FREE(fh, 3);
- if(add_obj(fh, dxpl, 10, SMALL_OBJ_SIZE1, &state, NULL))
+ if(add_obj(fh, dxpl, (size_t)10, SMALL_OBJ_SIZE1, &state, NULL))
FAIL_STACK_ERROR
/* Close the fractal heap */
@@ -2796,11 +2801,11 @@ error:
H5Fclose(file);
} H5E_END_TRY;
return(1);
-} /* test_abs_start_third_row() */
+} /* test_man_start_third_row() */
/*-------------------------------------------------------------------------
- * Function: test_abs_fill_fourth_row
+ * Function: test_man_fill_fourth_row
*
* Purpose: Test inserting mult. objects into absolute heap, creating
* enough direct blocks to fill first four rows of root indirect
@@ -2816,7 +2821,7 @@ error:
*-------------------------------------------------------------------------
*/
static int
-test_abs_fill_fourth_row(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
+test_man_fill_fourth_row(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
hid_t file = -1; /* File ID */
hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
@@ -2890,11 +2895,11 @@ error:
H5Fclose(file);
} H5E_END_TRY;
return(1);
-} /* test_abs_fill_fourth_row() */
+} /* test_man_fill_fourth_row() */
/*-------------------------------------------------------------------------
- * Function: test_abs_fill_all_root_direct
+ * Function: test_man_fill_all_root_direct
*
* Purpose: Test inserting mult. objects into absolute heap, creating
* enough direct blocks to fill all direct rows of root indirect
@@ -2910,7 +2915,7 @@ error:
*-------------------------------------------------------------------------
*/
static int
-test_abs_fill_all_root_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
+test_man_fill_all_root_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
hid_t file = -1; /* File ID */
hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
@@ -2982,11 +2987,11 @@ error:
H5Fclose(file);
} H5E_END_TRY;
return(1);
-} /* test_abs_fill_all_root_direct() */
+} /* test_man_fill_all_root_direct() */
/*-------------------------------------------------------------------------
- * Function: test_abs_first_recursive_indirect
+ * Function: test_man_first_recursive_indirect
*
* Purpose: Test inserting mult. objects into absolute heap, creating
* enough direct blocks to fill all direct rows of root indirect
@@ -3002,7 +3007,7 @@ error:
*-------------------------------------------------------------------------
*/
static int
-test_abs_first_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
+test_man_first_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
hid_t file = -1; /* File ID */
hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
@@ -3056,7 +3061,7 @@ test_abs_first_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_
/* Insert one more object, to force creation of first recursive indirect block */
state.man_alloc_size += DBLOCK_SIZE(fh, 0);
- if(add_obj(fh, dxpl, 10, SMALL_OBJ_SIZE1, &state, NULL))
+ if(add_obj(fh, dxpl, (size_t)10, SMALL_OBJ_SIZE1, &state, NULL))
FAIL_STACK_ERROR
/* Close the fractal heap */
@@ -3079,11 +3084,11 @@ error:
H5Fclose(file);
} H5E_END_TRY;
return(1);
-} /* test_abs_first_recursive_indirect() */
+} /* test_man_first_recursive_indirect() */
/*-------------------------------------------------------------------------
- * Function: test_abs_second_direct_recursive_indirect
+ * Function: test_man_second_direct_recursive_indirect
*
* Purpose: Test inserting mult. objects into absolute heap, creating
* enough direct blocks to fill all direct rows of root indirect
@@ -3100,7 +3105,7 @@ error:
*-------------------------------------------------------------------------
*/
static int
-test_abs_second_direct_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
+test_man_second_direct_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
hid_t file = -1; /* File ID */
hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
@@ -3162,7 +3167,7 @@ test_abs_second_direct_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fhe
* first recursive indirect block
*/
state.man_alloc_size += DBLOCK_SIZE(fh, 0);
- if(add_obj(fh, dxpl, 10, SMALL_OBJ_SIZE1, &state, NULL))
+ if(add_obj(fh, dxpl, (size_t)10, SMALL_OBJ_SIZE1, &state, NULL))
FAIL_STACK_ERROR
/* Close the fractal heap */
@@ -3185,11 +3190,11 @@ error:
H5Fclose(file);
} H5E_END_TRY;
return(1);
-} /* test_abs_second_direct_recursive_indirect() */
+} /* test_man_second_direct_recursive_indirect() */
/*-------------------------------------------------------------------------
- * Function: test_abs_fill_first_recursive_indirect
+ * Function: test_man_fill_first_recursive_indirect
*
* Purpose: Test inserting mult. objects into absolute heap, creating
* enough direct blocks to fill all direct rows of root indirect
@@ -3206,7 +3211,7 @@ error:
*-------------------------------------------------------------------------
*/
static int
-test_abs_fill_first_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
+test_man_fill_first_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
hid_t file = -1; /* File ID */
hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
@@ -3283,11 +3288,11 @@ error:
H5Fclose(file);
} H5E_END_TRY;
return(1);
-} /* test_abs_fill_first_recursive_indirect() */
+} /* test_man_fill_first_recursive_indirect() */
/*-------------------------------------------------------------------------
- * Function: test_abs_second_recursive_indirect
+ * Function: test_man_second_recursive_indirect
*
* Purpose: Test inserting mult. objects into absolute heap, creating
* enough direct blocks to fill all direct rows of root indirect
@@ -3305,7 +3310,7 @@ error:
*-------------------------------------------------------------------------
*/
static int
-test_abs_second_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
+test_man_second_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
hid_t file = -1; /* File ID */
hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
@@ -3366,7 +3371,7 @@ test_abs_second_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test
* recursive indirect block
*/
state.man_alloc_size += DBLOCK_SIZE(fh, 0);
- if(add_obj(fh, dxpl, 10, SMALL_OBJ_SIZE1, &state, NULL))
+ if(add_obj(fh, dxpl, (size_t)10, SMALL_OBJ_SIZE1, &state, NULL))
FAIL_STACK_ERROR
/* Close the fractal heap */
@@ -3389,11 +3394,11 @@ error:
H5Fclose(file);
} H5E_END_TRY;
return(1);
-} /* test_abs_second_recursive_indirect() */
+} /* test_man_second_recursive_indirect() */
/*-------------------------------------------------------------------------
- * Function: test_abs_fill_second_recursive_indirect
+ * Function: test_man_fill_second_recursive_indirect
*
* Purpose: Test inserting mult. objects into absolute heap, creating
* enough direct blocks to fill all direct rows of root indirect
@@ -3412,7 +3417,7 @@ error:
*-------------------------------------------------------------------------
*/
static int
-test_abs_fill_second_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
+test_man_fill_second_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
hid_t file = -1; /* File ID */
hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
@@ -3493,11 +3498,11 @@ error:
H5Fclose(file);
} H5E_END_TRY;
return(1);
-} /* test_abs_fill_second_recursive_indirect() */
+} /* test_man_fill_second_recursive_indirect() */
/*-------------------------------------------------------------------------
- * Function: test_abs_fill_recursive_indirect_row
+ * Function: test_man_fill_recursive_indirect_row
*
* Purpose: Test inserting mult. objects into absolute heap, creating
* enough direct blocks to fill all direct rows of root indirect
@@ -3516,7 +3521,7 @@ error:
*-------------------------------------------------------------------------
*/
static int
-test_abs_fill_recursive_indirect_row(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
+test_man_fill_recursive_indirect_row(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
hid_t file = -1; /* File ID */
hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
@@ -3593,11 +3598,11 @@ error:
H5Fclose(file);
} H5E_END_TRY;
return(1);
-} /* test_abs_fill_recursive_indirect_row() */
+} /* test_man_fill_recursive_indirect_row() */
/*-------------------------------------------------------------------------
- * Function: test_abs_start_2nd_recursive_indirect
+ * Function: test_man_start_2nd_recursive_indirect
*
* Purpose: Test inserting mult. objects into absolute heap, creating
* enough direct blocks to fill all direct rows of root indirect
@@ -3614,7 +3619,7 @@ error:
*-------------------------------------------------------------------------
*/
static int
-test_abs_start_2nd_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
+test_man_start_2nd_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
hid_t file = -1; /* File ID */
hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
@@ -3675,7 +3680,7 @@ test_abs_start_2nd_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_t
* recursive indirect block
*/
state.man_alloc_size += DBLOCK_SIZE(fh, 0);
- if(add_obj(fh, dxpl, 10, SMALL_OBJ_SIZE1, &state, NULL))
+ if(add_obj(fh, dxpl, (size_t)10, SMALL_OBJ_SIZE1, &state, NULL))
FAIL_STACK_ERROR
/* Close the fractal heap */
@@ -3698,11 +3703,11 @@ error:
H5Fclose(file);
} H5E_END_TRY;
return(1);
-} /* test_abs_start_2nd_recursive_indirect() */
+} /* test_man_start_2nd_recursive_indirect() */
/*-------------------------------------------------------------------------
- * Function: test_abs_recursive_indirect_two_deep
+ * Function: test_man_recursive_indirect_two_deep
*
* Purpose: Test inserting mult. objects into absolute heap, creating
* enough direct blocks to fill all direct rows of root indirect
@@ -3719,7 +3724,7 @@ error:
*-------------------------------------------------------------------------
*/
static int
-test_abs_recursive_indirect_two_deep(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
+test_man_recursive_indirect_two_deep(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
hid_t file = -1; /* File ID */
hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
@@ -3796,11 +3801,11 @@ error:
H5Fclose(file);
} H5E_END_TRY;
return(1);
-} /* test_abs_recursive_indirect_two_deep() */
+} /* test_man_recursive_indirect_two_deep() */
/*-------------------------------------------------------------------------
- * Function: test_abs_start_3rd_recursive_indirect
+ * Function: test_man_start_3rd_recursive_indirect
*
* Purpose: Test inserting mult. objects into absolute heap, creating
* enough direct blocks to fill all direct rows of root indirect
@@ -3818,7 +3823,7 @@ error:
*-------------------------------------------------------------------------
*/
static int
-test_abs_start_3rd_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
+test_man_start_3rd_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
hid_t file = -1; /* File ID */
hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
@@ -3879,7 +3884,7 @@ test_abs_start_3rd_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_t
* recursive indirect block
*/
state.man_alloc_size += DBLOCK_SIZE(fh, 0);
- if(add_obj(fh, dxpl, 10, SMALL_OBJ_SIZE1, &state, NULL))
+ if(add_obj(fh, dxpl, (size_t)10, SMALL_OBJ_SIZE1, &state, NULL))
FAIL_STACK_ERROR
/* Close the fractal heap */
@@ -3902,11 +3907,11 @@ error:
H5Fclose(file);
} H5E_END_TRY;
return(1);
-} /* test_abs_start_3rd_recursive_indirect() */
+} /* test_man_start_3rd_recursive_indirect() */
/*-------------------------------------------------------------------------
- * Function: test_abs_fill_first_3rd_recursive_indirect
+ * Function: test_man_fill_first_3rd_recursive_indirect
*
* Purpose: Test inserting mult. objects into absolute heap, creating
* enough direct blocks to fill all direct rows of root indirect
@@ -3924,7 +3929,7 @@ error:
*-------------------------------------------------------------------------
*/
static int
-test_abs_fill_first_3rd_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
+test_man_fill_first_3rd_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
hid_t file = -1; /* File ID */
hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
@@ -4009,11 +4014,11 @@ error:
H5Fclose(file);
} H5E_END_TRY;
return(1);
-} /* test_abs_fill_first_3rd_recursive_indirect() */
+} /* test_man_fill_first_3rd_recursive_indirect() */
/*-------------------------------------------------------------------------
- * Function: test_abs_fill_3rd_recursive_indirect_row
+ * Function: test_man_fill_3rd_recursive_indirect_row
*
* Purpose: Test inserting mult. objects into absolute heap, creating
* enough direct blocks to fill all direct rows of root indirect
@@ -4031,7 +4036,7 @@ error:
*-------------------------------------------------------------------------
*/
static int
-test_abs_fill_3rd_recursive_indirect_row(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
+test_man_fill_3rd_recursive_indirect_row(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
hid_t file = -1; /* File ID */
hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
@@ -4112,11 +4117,11 @@ error:
H5Fclose(file);
} H5E_END_TRY;
return(1);
-} /* test_abs_fill_3rd_recursive_indirect_row() */
+} /* test_man_fill_3rd_recursive_indirect_row() */
/*-------------------------------------------------------------------------
- * Function: test_abs_fill_all_3rd_recursive_indirect
+ * Function: test_man_fill_all_3rd_recursive_indirect
*
* Purpose: Test inserting mult. objects into absolute heap, creating
* enough direct blocks to fill all direct rows of root indirect
@@ -4134,7 +4139,7 @@ error:
*-------------------------------------------------------------------------
*/
static int
-test_abs_fill_all_3rd_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
+test_man_fill_all_3rd_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
hid_t file = -1; /* File ID */
hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
@@ -4215,11 +4220,11 @@ error:
H5Fclose(file);
} H5E_END_TRY;
return(1);
-} /* test_abs_fill_all_3rd_recursive_indirect() */
+} /* test_man_fill_all_3rd_recursive_indirect() */
/*-------------------------------------------------------------------------
- * Function: test_abs_start_4th_recursive_indirect
+ * Function: test_man_start_4th_recursive_indirect
*
* Purpose: Test inserting mult. objects into absolute heap, creating
* enough direct blocks to fill all direct rows of root indirect
@@ -4238,7 +4243,7 @@ error:
*-------------------------------------------------------------------------
*/
static int
-test_abs_start_4th_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
+test_man_start_4th_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
hid_t file = -1; /* File ID */
hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
@@ -4303,7 +4308,7 @@ test_abs_start_4th_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_t
* recursive indirect block
*/
state.man_alloc_size += DBLOCK_SIZE(fh, 0);
- if(add_obj(fh, dxpl, 10, SMALL_OBJ_SIZE1, &state, NULL))
+ if(add_obj(fh, dxpl, (size_t)10, SMALL_OBJ_SIZE1, &state, NULL))
FAIL_STACK_ERROR
/* Close the fractal heap */
@@ -4326,11 +4331,11 @@ error:
H5Fclose(file);
} H5E_END_TRY;
return(1);
-} /* test_abs_start_4th_recursive_indirect() */
+} /* test_man_start_4th_recursive_indirect() */
/*-------------------------------------------------------------------------
- * Function: test_abs_fill_first_4th_recursive_indirect
+ * Function: test_man_fill_first_4th_recursive_indirect
*
* Purpose: Test inserting mult. objects into absolute heap, creating
* enough direct blocks to fill all direct rows of root indirect
@@ -4349,7 +4354,7 @@ error:
*-------------------------------------------------------------------------
*/
static int
-test_abs_fill_first_4th_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
+test_man_fill_first_4th_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
hid_t file = -1; /* File ID */
hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
@@ -4442,11 +4447,11 @@ error:
H5Fclose(file);
} H5E_END_TRY;
return(1);
-} /* test_abs_fill_first_4th_recursive_indirect() */
+} /* test_man_fill_first_4th_recursive_indirect() */
/*-------------------------------------------------------------------------
- * Function: test_abs_fill_4th_recursive_indirect_row
+ * Function: test_man_fill_4th_recursive_indirect_row
*
* Purpose: Test inserting mult. objects into absolute heap, creating
* enough direct blocks to fill all direct rows of root indirect
@@ -4465,7 +4470,7 @@ error:
*-------------------------------------------------------------------------
*/
static int
-test_abs_fill_4th_recursive_indirect_row(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
+test_man_fill_4th_recursive_indirect_row(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
hid_t file = -1; /* File ID */
hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
@@ -4550,11 +4555,11 @@ error:
H5Fclose(file);
} H5E_END_TRY;
return(1);
-} /* test_abs_fill_4th_recursive_indirect_row() */
+} /* test_man_fill_4th_recursive_indirect_row() */
/*-------------------------------------------------------------------------
- * Function: test_abs_fill_all_4th_recursive_indirect
+ * Function: test_man_fill_all_4th_recursive_indirect
*
* Purpose: Test inserting mult. objects into absolute heap, creating
* enough direct blocks to fill all direct rows of root indirect
@@ -4573,7 +4578,7 @@ error:
*-------------------------------------------------------------------------
*/
static int
-test_abs_fill_all_4th_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
+test_man_fill_all_4th_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
hid_t file = -1; /* File ID */
hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
@@ -4658,13 +4663,14 @@ error:
H5Fclose(file);
} H5E_END_TRY;
return(1);
-} /* test_abs_fill_all_4th_recursive_indirect() */
+} /* test_man_fill_all_4th_recursive_indirect() */
#endif /* ALL_INSERT_TESTS */
+#ifndef QAK2
#ifndef QAK
/*-------------------------------------------------------------------------
- * Function: test_abs_start_5th_recursive_indirect
+ * Function: test_man_start_5th_recursive_indirect
*
* Purpose: Test inserting mult. objects into absolute heap, creating
* enough direct blocks to fill all direct rows of root indirect
@@ -4684,7 +4690,7 @@ error:
*-------------------------------------------------------------------------
*/
static int
-test_abs_start_5th_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
+test_man_start_5th_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
hid_t file = -1; /* File ID */
hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
@@ -4766,7 +4772,7 @@ test_abs_start_5th_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_t
* recursive indirect block
*/
state.man_alloc_size += DBLOCK_SIZE(fh, 0);
- if(add_obj(fh, dxpl, 10, SMALL_OBJ_SIZE1, &state, NULL))
+ if(add_obj(fh, dxpl, (size_t)10, (size_t)SMALL_OBJ_SIZE1, &state, NULL))
FAIL_STACK_ERROR
/* Close the fractal heap */
@@ -4789,13 +4795,13 @@ error:
H5Fclose(file);
} H5E_END_TRY;
return(1);
-} /* test_abs_start_5th_recursive_indirect() */
+} /* test_man_start_5th_recursive_indirect() */
#endif /* QAK */
#ifndef QAK
/*-------------------------------------------------------------------------
- * Function: test_abs_remove_bogus
+ * Function: test_man_remove_bogus
*
* Purpose: Test removing bogus heap IDs
*
@@ -4809,7 +4815,7 @@ error:
*-------------------------------------------------------------------------
*/
static int
-test_abs_remove_bogus(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
+test_man_remove_bogus(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
hid_t file = -1; /* File ID */
hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
@@ -4922,11 +4928,11 @@ error:
H5Fclose(file);
} H5E_END_TRY;
return(1);
-} /* test_abs_remove_bogus() */
+} /* test_man_remove_bogus() */
/*-------------------------------------------------------------------------
- * Function: test_abs_remove_one
+ * Function: test_man_remove_one
*
* Purpose: Test removing single object from heap
*
@@ -4940,7 +4946,7 @@ error:
*-------------------------------------------------------------------------
*/
static int
-test_abs_remove_one(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
+test_man_remove_one(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
hid_t file = -1; /* File ID */
hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
@@ -5076,11 +5082,11 @@ error:
H5Fclose(file);
} H5E_END_TRY;
return(1);
-} /* test_abs_remove_one() */
+} /* test_man_remove_one() */
/*-------------------------------------------------------------------------
- * Function: test_abs_remove_two
+ * Function: test_man_remove_two
*
* Purpose: Test removing two objects from heap
*
@@ -5094,7 +5100,7 @@ error:
*-------------------------------------------------------------------------
*/
static int
-test_abs_remove_two(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
+test_man_remove_two(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
hid_t file = -1; /* File ID */
hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
@@ -5259,11 +5265,11 @@ error:
H5Fclose(file);
} H5E_END_TRY;
return(1);
-} /* test_abs_remove_two() */
+} /* test_man_remove_two() */
/*-------------------------------------------------------------------------
- * Function: test_abs_remove_one_larger
+ * Function: test_man_remove_one_larger
*
* Purpose: Test removing single larger (but < standalone size) object
* from heap
@@ -5278,7 +5284,7 @@ error:
*-------------------------------------------------------------------------
*/
static int
-test_abs_remove_one_larger(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
+test_man_remove_one_larger(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
hid_t file = -1; /* File ID */
hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
@@ -5418,11 +5424,11 @@ error:
H5Fclose(file);
} H5E_END_TRY;
return(1);
-} /* test_abs_remove_one_larger() */
+} /* test_man_remove_one_larger() */
/*-------------------------------------------------------------------------
- * Function: test_abs_remove_two_larger
+ * Function: test_man_remove_two_larger
*
* Purpose: Test removing two larger (but < standalone size) objects
* from heap
@@ -5437,7 +5443,7 @@ error:
*-------------------------------------------------------------------------
*/
static int
-test_abs_remove_two_larger(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
+test_man_remove_two_larger(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
hid_t file = -1; /* File ID */
hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
@@ -5652,11 +5658,11 @@ error:
H5Fclose(file);
} H5E_END_TRY;
return(1);
-} /* test_abs_remove_two_larger() */
+} /* test_man_remove_two_larger() */
/*-------------------------------------------------------------------------
- * Function: test_abs_remove_three_larger
+ * Function: test_man_remove_three_larger
*
* Purpose: Test removing three larger (but < standalone size) objects
* from heap
@@ -5671,7 +5677,7 @@ error:
*-------------------------------------------------------------------------
*/
static int
-test_abs_remove_three_larger(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
+test_man_remove_three_larger(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
hid_t file = -1; /* File ID */
hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
@@ -5946,13 +5952,13 @@ error:
H5Fclose(file);
} H5E_END_TRY;
return(1);
-} /* test_abs_remove_three_larger() */
+} /* test_man_remove_three_larger() */
#endif /* QAK */
#ifndef QAK
/*-------------------------------------------------------------------------
- * Function: test_abs_remove_root_direct
+ * Function: test_man_remove_root_direct
*
* Purpose: Test filling and removing all objects from root direct block in
* heap
@@ -5967,7 +5973,7 @@ error:
*-------------------------------------------------------------------------
*/
static int
-test_abs_remove_root_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
+test_man_remove_root_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
hid_t file = -1; /* File ID */
hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
@@ -6022,11 +6028,11 @@ error:
H5Fclose(file);
} H5E_END_TRY;
return(1);
-} /* test_abs_remove_root_direct() */
+} /* test_man_remove_root_direct() */
/*-------------------------------------------------------------------------
- * Function: test_abs_remove_two_direct
+ * Function: test_man_remove_two_direct
*
* Purpose: Test filling and removing all objects from (first) two direct
* blocks in heap
@@ -6041,7 +6047,7 @@ error:
*-------------------------------------------------------------------------
*/
static int
-test_abs_remove_two_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
+test_man_remove_two_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
hid_t file = -1; /* File ID */
hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
@@ -6111,11 +6117,11 @@ error:
H5Fclose(file);
} H5E_END_TRY;
return(1);
-} /* test_abs_remove_two_direct() */
+} /* test_man_remove_two_direct() */
/*-------------------------------------------------------------------------
- * Function: test_abs_remove_first_row
+ * Function: test_man_remove_first_row
*
* Purpose: Test filling and removing all objects from first row of direct
* blocks in heap
@@ -6130,7 +6136,7 @@ error:
*-------------------------------------------------------------------------
*/
static int
-test_abs_remove_first_row(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
+test_man_remove_first_row(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
hid_t file = -1; /* File ID */
hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
@@ -6182,11 +6188,11 @@ error:
H5Fclose(file);
} H5E_END_TRY;
return(1);
-} /* test_abs_remove_first_row() */
+} /* test_man_remove_first_row() */
/*-------------------------------------------------------------------------
- * Function: test_abs_remove_first_two_rows
+ * Function: test_man_remove_first_two_rows
*
* Purpose: Test filling and removing all objects from first two rows of
* direct blocks in heap
@@ -6201,7 +6207,7 @@ error:
*-------------------------------------------------------------------------
*/
static int
-test_abs_remove_first_two_rows(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
+test_man_remove_first_two_rows(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
hid_t file = -1; /* File ID */
hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
@@ -6255,11 +6261,11 @@ error:
H5Fclose(file);
} H5E_END_TRY;
return(1);
-} /* test_abs_remove_first_two_rows() */
+} /* test_man_remove_first_two_rows() */
/*-------------------------------------------------------------------------
- * Function: test_abs_remove_first_four_rows
+ * Function: test_man_remove_first_four_rows
*
* Purpose: Test filling and removing all objects from first four rows of
* direct blocks in heap
@@ -6274,7 +6280,7 @@ error:
*-------------------------------------------------------------------------
*/
static int
-test_abs_remove_first_four_rows(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
+test_man_remove_first_four_rows(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
hid_t file = -1; /* File ID */
hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
@@ -6332,11 +6338,11 @@ error:
H5Fclose(file);
} H5E_END_TRY;
return(1);
-} /* test_abs_remove_first_four_rows() */
+} /* test_man_remove_first_four_rows() */
/*-------------------------------------------------------------------------
- * Function: test_abs_remove_all_root_direct
+ * Function: test_man_remove_all_root_direct
*
* Purpose: Test filling and removing all objects from all direct blocks
* in root indirect block of heap
@@ -6351,7 +6357,7 @@ error:
*-------------------------------------------------------------------------
*/
static int
-test_abs_remove_all_root_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
+test_man_remove_all_root_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
hid_t file = -1; /* File ID */
hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
@@ -6403,11 +6409,11 @@ error:
H5Fclose(file);
} H5E_END_TRY;
return(1);
-} /* test_abs_remove_all_root_direct() */
+} /* test_man_remove_all_root_direct() */
/*-------------------------------------------------------------------------
- * Function: test_abs_remove_2nd_indirect
+ * Function: test_man_remove_2nd_indirect
*
* Purpose: Test filling and removing all objects up to 2nd level indirect
* blocks of heap
@@ -6422,7 +6428,7 @@ error:
*-------------------------------------------------------------------------
*/
static int
-test_abs_remove_2nd_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
+test_man_remove_2nd_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
hid_t file = -1; /* File ID */
hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
@@ -6478,11 +6484,11 @@ error:
H5Fclose(file);
} H5E_END_TRY;
return(1);
-} /* test_abs_remove_2nd_indirect() */
+} /* test_man_remove_2nd_indirect() */
/*-------------------------------------------------------------------------
- * Function: test_abs_remove_3rd_indirect
+ * Function: test_man_remove_3rd_indirect
*
* Purpose: Test filling and removing all objects up to 3rd level indirect
* blocks of heap
@@ -6497,7 +6503,7 @@ error:
*-------------------------------------------------------------------------
*/
static int
-test_abs_remove_3rd_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
+test_man_remove_3rd_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
hid_t file = -1; /* File ID */
hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
@@ -6557,13 +6563,13 @@ error:
H5Fclose(file);
} H5E_END_TRY;
return(1);
-} /* test_abs_remove_3rd_indirect() */
+} /* test_man_remove_3rd_indirect() */
#endif /* QAK */
#ifndef QAK
/*-------------------------------------------------------------------------
- * Function: test_abs_skip_start_block
+ * Function: test_man_skip_start_block
*
* Purpose: Test inserting object into absolute heap which is too large
* for starting block size, which forces root indirect block
@@ -6581,7 +6587,7 @@ error:
*-------------------------------------------------------------------------
*/
static int
-test_abs_skip_start_block(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
+test_man_skip_start_block(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
hid_t file = -1; /* File ID */
hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
@@ -6611,7 +6617,7 @@ test_abs_skip_start_block(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t
state.man_free_space = cparam->managed.width * DBLOCK_FREE(fh, 0);
state.man_free_space += cparam->managed.width * DBLOCK_FREE(fh, 1);
state.man_free_space += cparam->managed.width * DBLOCK_FREE(fh, 2);
- if(add_obj(fh, dxpl, 10, obj_size, &state, &keep_ids))
+ if(add_obj(fh, dxpl, (size_t)10, obj_size, &state, &keep_ids))
TEST_ERROR
@@ -6639,11 +6645,11 @@ error:
H5Fclose(file);
} H5E_END_TRY;
return(1);
-} /* test_abs_skip_start_block() */
+} /* test_man_skip_start_block() */
/*-------------------------------------------------------------------------
- * Function: test_abs_skip_start_block_add_back
+ * Function: test_man_skip_start_block_add_back
*
* Purpose: Test inserting object into absolute heap which is too large
* for starting block size, which forces root indirect block
@@ -6659,7 +6665,7 @@ error:
*-------------------------------------------------------------------------
*/
static int
-test_abs_skip_start_block_add_back(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
+test_man_skip_start_block_add_back(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
hid_t file = -1; /* File ID */
hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
@@ -6691,7 +6697,7 @@ test_abs_skip_start_block_add_back(hid_t fapl, H5HF_create_t *cparam, fheap_test
state.man_free_space = cparam->managed.width * DBLOCK_FREE(fh, 0);
state.man_free_space += cparam->managed.width * DBLOCK_FREE(fh, 1);
state.man_free_space += cparam->managed.width * DBLOCK_FREE(fh, 2);
- if(add_obj(fh, dxpl, 10, obj_size, &state, &keep_ids))
+ if(add_obj(fh, dxpl, (size_t)10, obj_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
@@ -6700,7 +6706,7 @@ test_abs_skip_start_block_add_back(hid_t fapl, H5HF_create_t *cparam, fheap_test
/* Insert an object to fill up the heap block just created */
obj_size = DBLOCK_FREE(fh, 2) - obj_size;
- if(add_obj(fh, dxpl, 10, obj_size, &state, &keep_ids))
+ if(add_obj(fh, dxpl, (size_t)10, obj_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
@@ -6709,7 +6715,7 @@ test_abs_skip_start_block_add_back(hid_t fapl, H5HF_create_t *cparam, fheap_test
/* Insert second "real" object, which should go in earlier direct block */
state.man_alloc_size += DBLOCK_SIZE(fh, 0);
- if(add_obj(fh, dxpl, 20, SMALL_OBJ_SIZE2, &state, &keep_ids))
+ if(add_obj(fh, dxpl, (size_t)20, (size_t)SMALL_OBJ_SIZE2, &state, &keep_ids))
TEST_ERROR
@@ -6737,11 +6743,11 @@ error:
H5Fclose(file);
} H5E_END_TRY;
return(1);
-} /* test_abs_skip_start_block_add_back() */
+} /* test_man_skip_start_block_add_back() */
/*-------------------------------------------------------------------------
- * Function: test_abs_skip_start_block_add_skipped
+ * Function: test_man_skip_start_block_add_skipped
*
* Purpose: Test inserting object into absolute heap which is too large
* for starting block size, which forces root indirect block
@@ -6758,7 +6764,7 @@ error:
*-------------------------------------------------------------------------
*/
static int
-test_abs_skip_start_block_add_skipped(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
+test_man_skip_start_block_add_skipped(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
hid_t file = -1; /* File ID */
hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
@@ -6791,7 +6797,7 @@ test_abs_skip_start_block_add_skipped(hid_t fapl, H5HF_create_t *cparam, fheap_t
state.man_free_space = cparam->managed.width * DBLOCK_FREE(fh, 0);
state.man_free_space += cparam->managed.width * DBLOCK_FREE(fh, 1);
state.man_free_space += cparam->managed.width * DBLOCK_FREE(fh, 2);
- if(add_obj(fh, dxpl, 10, obj_size, &state, &keep_ids))
+ if(add_obj(fh, dxpl, (size_t)10, obj_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
@@ -6800,7 +6806,7 @@ test_abs_skip_start_block_add_skipped(hid_t fapl, H5HF_create_t *cparam, fheap_t
/* Insert an object to fill up the heap block just created */
obj_size = DBLOCK_FREE(fh, 2) - obj_size;
- if(add_obj(fh, dxpl, 10, obj_size, &state, &keep_ids))
+ if(add_obj(fh, dxpl, (size_t)10, obj_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
@@ -6819,7 +6825,7 @@ test_abs_skip_start_block_add_skipped(hid_t fapl, H5HF_create_t *cparam, fheap_t
/* Insert another object, which should extend direct blocks, instead of backfill */
state.man_alloc_size += DBLOCK_SIZE(fh, 2);
- if(add_obj(fh, dxpl, 20, SMALL_OBJ_SIZE2, &state, &keep_ids))
+ if(add_obj(fh, dxpl, (size_t)20, (size_t)SMALL_OBJ_SIZE2, &state, &keep_ids))
TEST_ERROR
@@ -6847,11 +6853,11 @@ error:
H5Fclose(file);
} H5E_END_TRY;
return(1);
-} /* test_abs_skip_start_block_add_skipped() */
+} /* test_man_skip_start_block_add_skipped() */
/*-------------------------------------------------------------------------
- * Function: test_abs_skip_2nd_block
+ * Function: test_man_skip_2nd_block
*
* Purpose: Test inserting object into absolute heap which is small
* enough for starting block size, then add object too large
@@ -6868,7 +6874,7 @@ error:
*-------------------------------------------------------------------------
*/
static int
-test_abs_skip_2nd_block(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
+test_man_skip_2nd_block(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
hid_t file = -1; /* File ID */
hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
@@ -6895,7 +6901,7 @@ test_abs_skip_2nd_block(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *t
state.man_size = DBLOCK_SIZE(fh, 0);
state.man_alloc_size = DBLOCK_SIZE(fh, 0);
state.man_free_space = DBLOCK_FREE(fh, 0);
- if(add_obj(fh, dxpl, 10, SMALL_OBJ_SIZE1, &state, &keep_ids))
+ if(add_obj(fh, dxpl, (size_t)10, (size_t)SMALL_OBJ_SIZE1, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
@@ -6913,7 +6919,7 @@ test_abs_skip_2nd_block(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *t
state.man_free_space += (cparam->managed.width - 1 )* DBLOCK_FREE(fh, 0);
state.man_free_space += cparam->managed.width * DBLOCK_FREE(fh, 1);
state.man_free_space += cparam->managed.width * DBLOCK_FREE(fh, 2);
- if(add_obj(fh, dxpl, 20, obj_size, &state, &keep_ids))
+ if(add_obj(fh, dxpl, (size_t)20, obj_size, &state, &keep_ids))
TEST_ERROR
@@ -6941,11 +6947,11 @@ error:
H5Fclose(file);
} H5E_END_TRY;
return(1);
-} /* test_abs_skip_2nd_block() */
+} /* test_man_skip_2nd_block() */
/*-------------------------------------------------------------------------
- * Function: test_abs_skip_2nd_block_add_skipped
+ * Function: test_man_skip_2nd_block_add_skipped
*
* Purpose: Test inserting object into absolute heap which is small
* enough for starting block size, then add object too large
@@ -6965,7 +6971,7 @@ error:
*-------------------------------------------------------------------------
*/
static int
-test_abs_skip_2nd_block_add_skipped(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
+test_man_skip_2nd_block_add_skipped(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
hid_t file = -1; /* File ID */
hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
@@ -6994,7 +7000,7 @@ test_abs_skip_2nd_block_add_skipped(hid_t fapl, H5HF_create_t *cparam, fheap_tes
state.man_size = DBLOCK_SIZE(fh, 0);
state.man_alloc_size = DBLOCK_SIZE(fh, 0);
state.man_free_space = DBLOCK_FREE(fh, 0);
- if(add_obj(fh, dxpl, 10, SMALL_OBJ_SIZE1, &state, &keep_ids))
+ if(add_obj(fh, dxpl, (size_t)10, (size_t)SMALL_OBJ_SIZE1, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
@@ -7012,7 +7018,7 @@ test_abs_skip_2nd_block_add_skipped(hid_t fapl, H5HF_create_t *cparam, fheap_tes
state.man_free_space += (cparam->managed.width - 1 )* DBLOCK_FREE(fh, 0);
state.man_free_space += cparam->managed.width * DBLOCK_FREE(fh, 1);
state.man_free_space += cparam->managed.width * DBLOCK_FREE(fh, 2);
- if(add_obj(fh, dxpl, 20, obj_size, &state, &keep_ids))
+ if(add_obj(fh, dxpl, (size_t)20, obj_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
@@ -7021,7 +7027,7 @@ test_abs_skip_2nd_block_add_skipped(hid_t fapl, H5HF_create_t *cparam, fheap_tes
/* Insert an object to fill up the (smaller) heap block just created */
obj_size = DBLOCK_FREE(fh, 0) - SMALL_OBJ_SIZE1;
- if(add_obj(fh, dxpl, 10, obj_size, &state, &keep_ids))
+ if(add_obj(fh, dxpl, (size_t)10, obj_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
@@ -7030,7 +7036,7 @@ test_abs_skip_2nd_block_add_skipped(hid_t fapl, H5HF_create_t *cparam, fheap_tes
/* Fill remainder of 2 * start size block */
obj_size = DBLOCK_FREE(fh, 2) - (DBLOCK_SIZE(fh, 0) + 1);
- if(add_obj(fh, dxpl, 20, obj_size, &state, &keep_ids))
+ if(add_obj(fh, dxpl, (size_t)20, obj_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
@@ -7056,7 +7062,7 @@ test_abs_skip_2nd_block_add_skipped(hid_t fapl, H5HF_create_t *cparam, fheap_tes
/* Insert one more object, to create new 2 * start size direct block */
state.man_alloc_size += DBLOCK_SIZE(fh, 2);
- if(add_obj(fh, dxpl, 10, SMALL_OBJ_SIZE1, &state, &keep_ids))
+ if(add_obj(fh, dxpl, (size_t)10, (size_t)SMALL_OBJ_SIZE1, &state, &keep_ids))
TEST_ERROR
@@ -7084,11 +7090,11 @@ error:
H5Fclose(file);
} H5E_END_TRY;
return(1);
-} /* test_abs_skip_2nd_block_add_skipped() */
+} /* test_man_skip_2nd_block_add_skipped() */
/*-------------------------------------------------------------------------
- * Function: test_abs_fill_one_partial_skip_2nd_block_add_skipped
+ * Function: test_man_fill_one_partial_skip_2nd_block_add_skipped
*
* Purpose: Test filling initial direct block, then add object small enough
* for initial block size (to create root indirect block), then
@@ -7110,7 +7116,7 @@ error:
*-------------------------------------------------------------------------
*/
static int
-test_abs_fill_one_partial_skip_2nd_block_add_skipped(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
+test_man_fill_one_partial_skip_2nd_block_add_skipped(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
hid_t file = -1; /* File ID */
hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
@@ -7150,7 +7156,7 @@ test_abs_fill_one_partial_skip_2nd_block_add_skipped(hid_t fapl, H5HF_create_t *
state.man_size += (cparam->managed.width - 1) * DBLOCK_SIZE(fh, 0);
state.man_alloc_size += DBLOCK_SIZE(fh, 0);
state.man_free_space += (cparam->managed.width - 1) * DBLOCK_FREE(fh, 0);
- if(add_obj(fh, dxpl, 10, SMALL_OBJ_SIZE1, &state, &keep_ids))
+ if(add_obj(fh, dxpl, (size_t)10, (size_t)SMALL_OBJ_SIZE1, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
@@ -7168,7 +7174,7 @@ test_abs_fill_one_partial_skip_2nd_block_add_skipped(hid_t fapl, H5HF_create_t *
state.man_free_space += cparam->managed.width * DBLOCK_FREE(fh, 1);
state.man_free_space += cparam->managed.width * DBLOCK_FREE(fh, 2);
state.man_free_space += cparam->managed.width * DBLOCK_FREE(fh, 3);
- if(add_obj(fh, dxpl, 10, obj_size, &state, &keep_ids))
+ if(add_obj(fh, dxpl, (size_t)10, obj_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
@@ -7177,7 +7183,7 @@ test_abs_fill_one_partial_skip_2nd_block_add_skipped(hid_t fapl, H5HF_create_t *
/* Insert an object to fill up the (smaller) heap block just created */
obj_size = DBLOCK_FREE(fh, 0) - SMALL_OBJ_SIZE1;
- if(add_obj(fh, dxpl, 10, obj_size, &state, &keep_ids))
+ if(add_obj(fh, dxpl, (size_t)10, obj_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
@@ -7186,7 +7192,7 @@ test_abs_fill_one_partial_skip_2nd_block_add_skipped(hid_t fapl, H5HF_create_t *
/* Insert object to fill remainder of 4 * start size block */
obj_size = DBLOCK_FREE(fh, 3) - (DBLOCK_SIZE(fh, 2) + 1);
- if(add_obj(fh, dxpl, 10, obj_size, &state, &keep_ids))
+ if(add_obj(fh, dxpl, (size_t)10, obj_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
@@ -7223,7 +7229,7 @@ test_abs_fill_one_partial_skip_2nd_block_add_skipped(hid_t fapl, H5HF_create_t *
/* Insert one more object, to create new 4 * start size direct block */
state.man_alloc_size += DBLOCK_SIZE(fh, 3);
- if(add_obj(fh, dxpl, 10, SMALL_OBJ_SIZE1, &state, &keep_ids))
+ if(add_obj(fh, dxpl, (size_t)10, (size_t)SMALL_OBJ_SIZE1, &state, &keep_ids))
TEST_ERROR
@@ -7251,11 +7257,11 @@ error:
H5Fclose(file);
} H5E_END_TRY;
return(1);
-} /* test_abs_fill_one_partial_skip_2nd_block_add_skipped() */
+} /* test_man_fill_one_partial_skip_2nd_block_add_skipped() */
/*-------------------------------------------------------------------------
- * Function: test_abs_fill_row_skip_add_skipped
+ * Function: test_man_fill_row_skip_add_skipped
*
* Purpose: Test filling first row of direct blocks, then
* add object too large for any blocks in first three rows of
@@ -7276,7 +7282,7 @@ error:
*-------------------------------------------------------------------------
*/
static int
-test_abs_fill_row_skip_add_skipped(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
+test_man_fill_row_skip_add_skipped(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
hid_t file = -1; /* File ID */
hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
@@ -7319,7 +7325,7 @@ test_abs_fill_row_skip_add_skipped(hid_t fapl, H5HF_create_t *cparam, fheap_test
state.man_free_space += cparam->managed.width * DBLOCK_FREE(fh, 1);
state.man_free_space += cparam->managed.width * DBLOCK_FREE(fh, 2);
state.man_free_space += cparam->managed.width * DBLOCK_FREE(fh, 3);
- if(add_obj(fh, dxpl, 20, obj_size, &state, &keep_ids))
+ if(add_obj(fh, dxpl, (size_t)20, obj_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
@@ -7328,7 +7334,7 @@ test_abs_fill_row_skip_add_skipped(hid_t fapl, H5HF_create_t *cparam, fheap_test
/* Insert object to fill remainder of 4 * start size block */
obj_size = DBLOCK_FREE(fh, 3) - obj_size;
- if(add_obj(fh, dxpl, 20, obj_size, &state, &keep_ids))
+ if(add_obj(fh, dxpl, (size_t)20, obj_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
@@ -7353,7 +7359,7 @@ test_abs_fill_row_skip_add_skipped(hid_t fapl, H5HF_create_t *cparam, fheap_test
/* Insert one more object, to create new 4 * start size direct block */
state.man_alloc_size += DBLOCK_SIZE(fh, 3);
- if(add_obj(fh, dxpl, 10, obj_size, &state, &keep_ids))
+ if(add_obj(fh, dxpl, (size_t)10, obj_size, &state, &keep_ids))
TEST_ERROR
@@ -7381,11 +7387,11 @@ error:
H5Fclose(file);
} H5E_END_TRY;
return(1);
-} /* test_abs_fill_row_skip_add_skipped() */
+} /* test_man_fill_row_skip_add_skipped() */
/*-------------------------------------------------------------------------
- * Function: test_abs_skip_direct_skip_indirect_two_rows_add_skipped
+ * Function: test_man_skip_direct_skip_indirect_two_rows_add_skipped
*
* Purpose: Test adding object too large for all but the last row in the
* direct blocks in root indirect block, then
@@ -7403,7 +7409,7 @@ error:
*-------------------------------------------------------------------------
*/
static int
-test_abs_skip_direct_skip_indirect_two_rows_add_skipped(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
+test_man_skip_direct_skip_indirect_two_rows_add_skipped(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
hid_t file = -1; /* File ID */
hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
@@ -7444,7 +7450,7 @@ test_abs_skip_direct_skip_indirect_two_rows_add_skipped(hid_t fapl, H5HF_create_
*/
obj_size = DBLOCK_SIZE(fh, row - 2) + 1;
state.man_alloc_size += DBLOCK_SIZE(fh, row - 1);
- if(add_obj(fh, dxpl, 10, obj_size, &state, &keep_ids))
+ if(add_obj(fh, dxpl, (size_t)10, obj_size, &state, &keep_ids))
TEST_ERROR
/* Compute heap size & free space when all direct blocks allocated */
@@ -7461,7 +7467,7 @@ test_abs_skip_direct_skip_indirect_two_rows_add_skipped(hid_t fapl, H5HF_create_
obj_size = DBLOCK_SIZE(fh, num_direct_rows - 2) + 1;
for(v = 0; v < cparam->managed.width; v++) {
state.man_alloc_size += DBLOCK_SIZE(fh, num_direct_rows - 1);
- if(add_obj(fh, dxpl, 20, obj_size, &state, &keep_ids))
+ if(add_obj(fh, dxpl, (size_t)20, obj_size, &state, &keep_ids))
TEST_ERROR
} /* end for */
@@ -7481,7 +7487,7 @@ test_abs_skip_direct_skip_indirect_two_rows_add_skipped(hid_t fapl, H5HF_create_
*/
obj_size = DBLOCK_SIZE(fh, num_direct_rows - 2) + 1;
state.man_alloc_size += DBLOCK_SIZE(fh, num_direct_rows - 1);
- if(add_obj(fh, dxpl, 20, obj_size, &state, &keep_ids))
+ if(add_obj(fh, dxpl, (size_t)20, obj_size, &state, &keep_ids))
TEST_ERROR
@@ -7509,11 +7515,11 @@ error:
H5Fclose(file);
} H5E_END_TRY;
return(1);
-} /* test_abs_skip_direct_skip_indirect_two_rows_add_skipped() */
+} /* test_man_skip_direct_skip_indirect_two_rows_add_skipped() */
/*-------------------------------------------------------------------------
- * Function: test_abs_fill_direct_skip_indirect_start_block_add_skipped
+ * Function: test_man_fill_direct_skip_indirect_start_block_add_skipped
*
* Purpose: Test filling all direct blocks in root indirect block, then
* add object too large for initial block in first row of direct
@@ -7530,7 +7536,7 @@ error:
*-------------------------------------------------------------------------
*/
static int
-test_abs_fill_direct_skip_indirect_start_block_add_skipped(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
+test_man_fill_direct_skip_indirect_start_block_add_skipped(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
hid_t file = -1; /* File ID */
hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
@@ -7567,7 +7573,7 @@ test_abs_fill_direct_skip_indirect_start_block_add_skipped(hid_t fapl, H5HF_crea
*/
obj_size = DBLOCK_SIZE(fh, 2) + 1;
state.man_alloc_size += DBLOCK_SIZE(fh, 3);
- if(add_obj(fh, dxpl, 20, obj_size, &state, &keep_ids))
+ if(add_obj(fh, dxpl, (size_t)20, obj_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
@@ -7586,7 +7592,7 @@ test_abs_fill_direct_skip_indirect_start_block_add_skipped(hid_t fapl, H5HF_crea
/* Insert an object to fill up the (biggest) heap block created */
obj_size = DBLOCK_FREE(fh, 3) - obj_size;
- if(add_obj(fh, dxpl, 20, obj_size, &state, &keep_ids))
+ if(add_obj(fh, dxpl, (size_t)20, obj_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
@@ -7604,7 +7610,7 @@ test_abs_fill_direct_skip_indirect_start_block_add_skipped(hid_t fapl, H5HF_crea
/* Insert one more object, to create new 4 * start size direct block */
obj_size = SMALL_OBJ_SIZE1;
state.man_alloc_size += DBLOCK_SIZE(fh, 3);
- if(add_obj(fh, dxpl, 10, obj_size, &state, &keep_ids))
+ if(add_obj(fh, dxpl, (size_t)10, obj_size, &state, &keep_ids))
TEST_ERROR
@@ -7632,11 +7638,11 @@ error:
H5Fclose(file);
} H5E_END_TRY;
return(1);
-} /* test_abs_fill_direct_skip_indirect_start_block_add_skipped() */
+} /* test_man_fill_direct_skip_indirect_start_block_add_skipped() */
/*-------------------------------------------------------------------------
- * Function: test_abs_fill_direct_skip_2nd_indirect_start_block_add_skipped
+ * Function: test_man_fill_direct_skip_2nd_indirect_start_block_add_skipped
*
* Purpose: Test filling all direct blocks in root indirect block, then
* add object too large for all direct blocks in first row of
@@ -7654,7 +7660,7 @@ error:
*-------------------------------------------------------------------------
*/
static int
-test_abs_fill_direct_skip_2nd_indirect_start_block_add_skipped(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
+test_man_fill_direct_skip_2nd_indirect_start_block_add_skipped(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
hid_t file = -1; /* File ID */
hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
@@ -7698,7 +7704,7 @@ test_abs_fill_direct_skip_2nd_indirect_start_block_add_skipped(hid_t fapl, H5HF_
*/
obj_size = DBLOCK_SIZE(fh, num_first_indirect_rows - 1) + 1;
state.man_alloc_size += DBLOCK_SIZE(fh, num_first_indirect_rows);
- if(add_obj(fh, dxpl, 20, obj_size, &state, &keep_ids))
+ if(add_obj(fh, dxpl, (size_t)20, obj_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
@@ -7707,7 +7713,7 @@ test_abs_fill_direct_skip_2nd_indirect_start_block_add_skipped(hid_t fapl, H5HF_
/* Insert object to fill space in (large) block created */
obj_size = DBLOCK_FREE(fh, num_first_indirect_rows) - obj_size;
- if(add_obj(fh, dxpl, 20, obj_size, &state, &keep_ids))
+ if(add_obj(fh, dxpl, (size_t)20, obj_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
@@ -7733,7 +7739,7 @@ test_abs_fill_direct_skip_2nd_indirect_start_block_add_skipped(hid_t fapl, H5HF_
/* Add one more object, to create another "large" block */
obj_size = SMALL_OBJ_SIZE1;
state.man_alloc_size += DBLOCK_SIZE(fh, num_first_indirect_rows);
- if(add_obj(fh, dxpl, 10, obj_size, &state, &keep_ids))
+ if(add_obj(fh, dxpl, (size_t)10, obj_size, &state, &keep_ids))
TEST_ERROR
/* Perform common file & heap close operations */
@@ -7760,11 +7766,11 @@ error:
H5Fclose(file);
} H5E_END_TRY;
return(1);
-} /* test_abs_fill_direct_skip_2nd_indirect_start_block_add_skipped() */
+} /* test_man_fill_direct_skip_2nd_indirect_start_block_add_skipped() */
/*-------------------------------------------------------------------------
- * Function: test_abs_fill_2nd_direct_less_one_wrap_start_block_add_skipped
+ * Function: test_man_fill_2nd_direct_less_one_wrap_start_block_add_skipped
*
* Purpose: Test filling all direct blocks in root indirect block and all
* direct blocks in 2nd level indirect blocks, except the last
@@ -7783,7 +7789,7 @@ error:
*-------------------------------------------------------------------------
*/
static int
-test_abs_fill_2nd_direct_less_one_wrap_start_block_add_skipped(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
+test_man_fill_2nd_direct_less_one_wrap_start_block_add_skipped(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
hid_t file = -1; /* File ID */
hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
@@ -7839,7 +7845,7 @@ test_abs_fill_2nd_direct_less_one_wrap_start_block_add_skipped(hid_t fapl, H5HF_
HDfprintf(stderr, "obj_size = %Zu\n", obj_size);
#endif /* QAK */
state.man_alloc_size += DBLOCK_SIZE(fh, num_first_indirect_rows);
- if(add_obj(fh, dxpl, 20, obj_size, &state, &keep_ids))
+ if(add_obj(fh, dxpl, (size_t)20, obj_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
@@ -7848,7 +7854,7 @@ HDfprintf(stderr, "obj_size = %Zu\n", obj_size);
/* Insert object to fill space in (large) block created */
obj_size = DBLOCK_FREE(fh, num_first_indirect_rows) - obj_size;
- if(add_obj(fh, dxpl, 20, obj_size, &state, &keep_ids))
+ if(add_obj(fh, dxpl, (size_t)20, obj_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
@@ -7875,7 +7881,7 @@ HDfprintf(stderr, "obj_size = %Zu\n", obj_size);
/* Add one more object, to create another "large" block */
obj_size = SMALL_OBJ_SIZE1;
state.man_alloc_size += DBLOCK_SIZE(fh, num_first_indirect_rows);
- if(add_obj(fh, dxpl, 10, obj_size, &state, &keep_ids))
+ if(add_obj(fh, dxpl, (size_t)10, obj_size, &state, &keep_ids))
TEST_ERROR
@@ -7903,11 +7909,11 @@ error:
H5Fclose(file);
} H5E_END_TRY;
return(1);
-} /* test_abs_fill_2nd_direct_less_one_wrap_start_block_add_skipped() */
+} /* test_man_fill_2nd_direct_less_one_wrap_start_block_add_skipped() */
/*-------------------------------------------------------------------------
- * Function: test_abs_fill_direct_skip_2nd_indirect_skip_2nd_block_add_skipped
+ * Function: test_man_fill_direct_skip_2nd_indirect_skip_2nd_block_add_skipped
*
* Purpose: Test filling all direct blocks in root indirect block, then
* add object too large for all direct blocks in first row of
@@ -7929,7 +7935,7 @@ error:
*-------------------------------------------------------------------------
*/
static int
-test_abs_fill_direct_skip_2nd_indirect_skip_2nd_block_add_skipped(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
+test_man_fill_direct_skip_2nd_indirect_skip_2nd_block_add_skipped(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
hid_t file = -1; /* File ID */
hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
@@ -7976,7 +7982,7 @@ test_abs_fill_direct_skip_2nd_indirect_skip_2nd_block_add_skipped(hid_t fapl, H5
HDfprintf(stderr, "obj_size = %Zu\n", obj_size);
#endif /* QAK */
state.man_alloc_size += DBLOCK_SIZE(fh, num_first_indirect_rows);
- if(add_obj(fh, dxpl, 20, obj_size, &state, &keep_ids))
+ if(add_obj(fh, dxpl, (size_t)20, obj_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
@@ -7985,7 +7991,7 @@ HDfprintf(stderr, "obj_size = %Zu\n", obj_size);
/* Insert object to fill space in (large) block created */
obj_size = DBLOCK_FREE(fh, num_first_indirect_rows) - obj_size;
- if(add_obj(fh, dxpl, 20, obj_size, &state, &keep_ids))
+ if(add_obj(fh, dxpl, (size_t)20, obj_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
@@ -7998,7 +8004,7 @@ HDfprintf(stderr, "obj_size = %Zu\n", obj_size);
HDfprintf(stderr, "obj_size = %Zu\n", obj_size);
#endif /* QAK */
state.man_alloc_size += DBLOCK_SIZE(fh, 4);
- if(add_obj(fh, dxpl, 10, obj_size, &state, &keep_ids))
+ if(add_obj(fh, dxpl, (size_t)10, obj_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
@@ -8010,7 +8016,7 @@ HDfprintf(stderr, "obj_size = %Zu\n", obj_size);
#ifdef QAK
HDfprintf(stderr, "obj_size = %Zu\n", obj_size);
#endif /* QAK */
- if(add_obj(fh, dxpl, 20, obj_size, &state, &keep_ids))
+ if(add_obj(fh, dxpl, (size_t)20, obj_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
@@ -8021,7 +8027,7 @@ HDfprintf(stderr, "obj_size = %Zu\n", obj_size);
obj_size = DBLOCK_FREE(fh, 4);
for(u = 1; u < cparam->managed.width; u++) {
state.man_alloc_size += DBLOCK_SIZE(fh, 4);
- if(add_obj(fh, dxpl, 20, obj_size, &state, &keep_ids))
+ if(add_obj(fh, dxpl, (size_t)20, obj_size, &state, &keep_ids))
TEST_ERROR
} /* end for */
@@ -8050,7 +8056,7 @@ HDfprintf(stderr, "obj_size = %Zu\n", obj_size);
/* Add one more object, to create another "large" block */
obj_size = SMALL_OBJ_SIZE1;
state.man_alloc_size += DBLOCK_SIZE(fh, num_first_indirect_rows);
- if(add_obj(fh, dxpl, 10, obj_size, &state, &keep_ids))
+ if(add_obj(fh, dxpl, (size_t)10, obj_size, &state, &keep_ids))
TEST_ERROR
@@ -8078,11 +8084,11 @@ error:
H5Fclose(file);
} H5E_END_TRY;
return(1);
-} /* test_abs_fill_direct_skip_2nd_indirect_skip_2nd_block_add_skipped() */
+} /* test_man_fill_direct_skip_2nd_indirect_skip_2nd_block_add_skipped() */
/*-------------------------------------------------------------------------
- * Function: test_abs_fill_direct_skip_indirect_two_rows_add_skipped
+ * Function: test_man_fill_direct_skip_indirect_two_rows_add_skipped
*
* Purpose: Test filling all direct blocks in root indirect block, then
* add object too large for initial block in first two rows of
@@ -8099,7 +8105,7 @@ error:
*-------------------------------------------------------------------------
*/
static int
-test_abs_fill_direct_skip_indirect_two_rows_add_skipped(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
+test_man_fill_direct_skip_indirect_two_rows_add_skipped(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
hid_t file = -1; /* File ID */
hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
@@ -8143,7 +8149,7 @@ test_abs_fill_direct_skip_indirect_two_rows_add_skipped(hid_t fapl, H5HF_create_
*/
obj_size = DBLOCK_SIZE(fh, max_dblock_rows - 2) + 1;
state.man_alloc_size += DBLOCK_SIZE(fh, max_dblock_rows - 1);
- if(add_obj(fh, dxpl, 20, obj_size, &state, &keep_ids))
+ if(add_obj(fh, dxpl, (size_t)20, obj_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
@@ -8152,7 +8158,7 @@ test_abs_fill_direct_skip_indirect_two_rows_add_skipped(hid_t fapl, H5HF_create_
/* Insert an object to fill up the (biggest) heap block created */
obj_size = DBLOCK_FREE(fh, max_dblock_rows - 1) - obj_size;
- if(add_obj(fh, dxpl, 20, obj_size, &state, &keep_ids))
+ if(add_obj(fh, dxpl, (size_t)20, obj_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
@@ -8202,7 +8208,7 @@ test_abs_fill_direct_skip_indirect_two_rows_add_skipped(hid_t fapl, H5HF_create_
/* Add one more object, to create another "large" block */
obj_size = SMALL_OBJ_SIZE1;
state.man_alloc_size += DBLOCK_SIZE(fh, max_dblock_rows - 1);
- if(add_obj(fh, dxpl, 10, obj_size, &state, &keep_ids))
+ if(add_obj(fh, dxpl, (size_t)10, obj_size, &state, &keep_ids))
TEST_ERROR
@@ -8230,11 +8236,11 @@ error:
H5Fclose(file);
} H5E_END_TRY;
return(1);
-} /* test_abs_fill_direct_skip_indirect_two_rows_add_skipped() */
+} /* test_man_fill_direct_skip_indirect_two_rows_add_skipped() */
/*-------------------------------------------------------------------------
- * Function: test_abs_fill_direct_skip_indirect_two_rows_skip_indirect_row_add_skipped
+ * Function: test_man_fill_direct_skip_indirect_two_rows_skip_indirect_row_add_skipped
*
* Purpose: Test filling all direct blocks in root indirect block, then
* add object too large for initial block in first two rows of
@@ -8253,7 +8259,7 @@ error:
*-------------------------------------------------------------------------
*/
static int
-test_abs_fill_direct_skip_indirect_two_rows_skip_indirect_row_add_skipped(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
+test_man_fill_direct_skip_indirect_two_rows_skip_indirect_row_add_skipped(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
hid_t file = -1; /* File ID */
hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
@@ -8297,7 +8303,7 @@ test_abs_fill_direct_skip_indirect_two_rows_skip_indirect_row_add_skipped(hid_t
*/
obj_size = DBLOCK_SIZE(fh, max_dblock_rows - 2) + 1;
state.man_alloc_size += DBLOCK_SIZE(fh, max_dblock_rows - 1);
- if(add_obj(fh, dxpl, 20, obj_size, &state, &keep_ids))
+ if(add_obj(fh, dxpl, (size_t)20, obj_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
@@ -8306,7 +8312,7 @@ test_abs_fill_direct_skip_indirect_two_rows_skip_indirect_row_add_skipped(hid_t
/* Insert an object to fill up the (biggest) heap block created */
obj_size = DBLOCK_FREE(fh, max_dblock_rows - 1) - obj_size;
- if(add_obj(fh, dxpl, 20, obj_size, &state, &keep_ids))
+ if(add_obj(fh, dxpl, (size_t)20, obj_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
@@ -8319,7 +8325,7 @@ test_abs_fill_direct_skip_indirect_two_rows_skip_indirect_row_add_skipped(hid_t
*/
obj_size = DBLOCK_SIZE(fh, max_dblock_rows - 3) + 1;
state.man_alloc_size += DBLOCK_SIZE(fh, max_dblock_rows - 2);
- if(add_obj(fh, dxpl, 20, obj_size, &state, &keep_ids))
+ if(add_obj(fh, dxpl, (size_t)20, obj_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
@@ -8328,7 +8334,7 @@ test_abs_fill_direct_skip_indirect_two_rows_skip_indirect_row_add_skipped(hid_t
/* Insert an object to fill up the (2nd biggest) heap block created */
obj_size = DBLOCK_FREE(fh, max_dblock_rows - 2) - obj_size;
- if(add_obj(fh, dxpl, 20, obj_size, &state, &keep_ids))
+ if(add_obj(fh, dxpl, (size_t)20, obj_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
@@ -8383,7 +8389,7 @@ test_abs_fill_direct_skip_indirect_two_rows_skip_indirect_row_add_skipped(hid_t
/* Add one more object, to create another "large" block */
obj_size = SMALL_OBJ_SIZE1;
state.man_alloc_size += DBLOCK_SIZE(fh, max_dblock_rows - 1);
- if(add_obj(fh, dxpl, 10, obj_size, &state, &keep_ids))
+ if(add_obj(fh, dxpl, (size_t)10, obj_size, &state, &keep_ids))
TEST_ERROR
@@ -8411,11 +8417,11 @@ error:
H5Fclose(file);
} H5E_END_TRY;
return(1);
-} /* test_abs_fill_direct_skip_indirect_two_rows_skip_indirect_row_add_skipped() */
+} /* test_man_fill_direct_skip_indirect_two_rows_skip_indirect_row_add_skipped() */
/*-------------------------------------------------------------------------
- * Function: test_abs_fill_2nd_direct_skip_start_block_add_skipped
+ * Function: test_man_fill_2nd_direct_skip_start_block_add_skipped
*
* Purpose: Test filling all direct blocks in root indirect block and all
* direct blocks in 2nd level indirect blocks, the insert object
@@ -8433,7 +8439,7 @@ error:
*-------------------------------------------------------------------------
*/
static int
-test_abs_fill_2nd_direct_skip_start_block_add_skipped(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
+test_man_fill_2nd_direct_skip_start_block_add_skipped(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
hid_t file = -1; /* File ID */
hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
@@ -8479,7 +8485,7 @@ test_abs_fill_2nd_direct_skip_start_block_add_skipped(hid_t fapl, H5HF_create_t
*/
obj_size = DBLOCK_SIZE(fh, 2) + 1;
state.man_alloc_size += DBLOCK_SIZE(fh, 3);
- if(add_obj(fh, dxpl, 10, obj_size, &state, &keep_ids))
+ if(add_obj(fh, dxpl, (size_t)10, obj_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
@@ -8488,7 +8494,7 @@ test_abs_fill_2nd_direct_skip_start_block_add_skipped(hid_t fapl, H5HF_create_t
/* Insert object to fill space in (large) block created */
obj_size = DBLOCK_FREE(fh, 3) - obj_size;
- if(add_obj(fh, dxpl, 20, obj_size, &state, &keep_ids))
+ if(add_obj(fh, dxpl, (size_t)20, obj_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
@@ -8510,7 +8516,7 @@ test_abs_fill_2nd_direct_skip_start_block_add_skipped(hid_t fapl, H5HF_create_t
/* Add one more object, to create another "large" block */
obj_size = SMALL_OBJ_SIZE1;
state.man_alloc_size += DBLOCK_SIZE(fh, 3);
- if(add_obj(fh, dxpl, 10, obj_size, &state, &keep_ids))
+ if(add_obj(fh, dxpl, (size_t)10, obj_size, &state, &keep_ids))
TEST_ERROR
@@ -8538,11 +8544,11 @@ error:
H5Fclose(file);
} H5E_END_TRY;
return(1);
-} /* test_abs_fill_2nd_direct_skip_start_block_add_skipped() */
+} /* test_man_fill_2nd_direct_skip_start_block_add_skipped() */
/*-------------------------------------------------------------------------
- * Function: test_abs_fill_2nd_direct_skip_2nd_indirect_start_block_add_skipped
+ * Function: test_man_fill_2nd_direct_skip_2nd_indirect_start_block_add_skipped
*
* Purpose: Test filling all direct blocks in root indirect block and all
* direct blocks in 2nd level indirect blocks, fill all direct
@@ -8562,7 +8568,7 @@ error:
*-------------------------------------------------------------------------
*/
static int
-test_abs_fill_2nd_direct_skip_2nd_indirect_start_block_add_skipped(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
+test_man_fill_2nd_direct_skip_2nd_indirect_start_block_add_skipped(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
hid_t file = -1; /* File ID */
hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
@@ -8616,7 +8622,7 @@ test_abs_fill_2nd_direct_skip_2nd_indirect_start_block_add_skipped(hid_t fapl, H
*/
obj_size = DBLOCK_SIZE(fh, 2) + 1;
state.man_alloc_size += DBLOCK_SIZE(fh, 3);
- if(add_obj(fh, dxpl, 10, obj_size, &state, &keep_ids))
+ if(add_obj(fh, dxpl, (size_t)10, obj_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
@@ -8625,7 +8631,7 @@ test_abs_fill_2nd_direct_skip_2nd_indirect_start_block_add_skipped(hid_t fapl, H
/* Insert object to fill space in (large) block created */
obj_size = DBLOCK_FREE(fh, 3) - obj_size;
- if(add_obj(fh, dxpl, 20, obj_size, &state, &keep_ids))
+ if(add_obj(fh, dxpl, (size_t)20, obj_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
@@ -8649,7 +8655,7 @@ test_abs_fill_2nd_direct_skip_2nd_indirect_start_block_add_skipped(hid_t fapl, H
/* Add one more object, to create another "large" block */
obj_size = SMALL_OBJ_SIZE1;
state.man_alloc_size += DBLOCK_SIZE(fh, 3);
- if(add_obj(fh, dxpl, 10, obj_size, &state, &keep_ids))
+ if(add_obj(fh, dxpl, (size_t)10, obj_size, &state, &keep_ids))
TEST_ERROR
@@ -8677,11 +8683,11 @@ error:
H5Fclose(file);
} H5E_END_TRY;
return(1);
-} /* test_abs_fill_2nd_direct_skip_2nd_indirect_start_block_add_skipped() */
+} /* test_man_fill_2nd_direct_skip_2nd_indirect_start_block_add_skipped() */
/*-------------------------------------------------------------------------
- * Function: test_abs_fill_2nd_direct_fill_direct_skip_3rd_indirect_start_block_add_skipped
+ * Function: test_man_fill_2nd_direct_fill_direct_skip_3rd_indirect_start_block_add_skipped
*
* Purpose: Test filling all direct blocks in root indirect block and all
* direct blocks in 2nd level indirect blocks, fill all direct
@@ -8700,7 +8706,7 @@ error:
*-------------------------------------------------------------------------
*/
static int
-test_abs_fill_2nd_direct_fill_direct_skip_3rd_indirect_start_block_add_skipped(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
+test_man_fill_2nd_direct_fill_direct_skip_3rd_indirect_start_block_add_skipped(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
hid_t file = -1; /* File ID */
hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
@@ -8762,7 +8768,7 @@ test_abs_fill_2nd_direct_fill_direct_skip_3rd_indirect_start_block_add_skipped(h
HDfprintf(stderr, "obj_size = %Zu\n", obj_size);
#endif /* QAK */
state.man_alloc_size += DBLOCK_SIZE(fh, num_first_indirect_rows);
- if(add_obj(fh, dxpl, 20, obj_size, &state, &keep_ids))
+ if(add_obj(fh, dxpl, (size_t)20, obj_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
@@ -8771,7 +8777,7 @@ HDfprintf(stderr, "obj_size = %Zu\n", obj_size);
/* Insert object to fill space in (large) block created */
obj_size = DBLOCK_FREE(fh, num_first_indirect_rows) - obj_size;
- if(add_obj(fh, dxpl, 20, obj_size, &state, &keep_ids))
+ if(add_obj(fh, dxpl, (size_t)20, obj_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
@@ -8800,7 +8806,7 @@ HDfprintf(stderr, "obj_size = %Zu\n", obj_size);
/* Add one more object, to create another "large" block */
obj_size = SMALL_OBJ_SIZE1;
state.man_alloc_size += DBLOCK_SIZE(fh, num_first_indirect_rows);
- if(add_obj(fh, dxpl, 10, obj_size, &state, &keep_ids))
+ if(add_obj(fh, dxpl, (size_t)10, obj_size, &state, &keep_ids))
TEST_ERROR
@@ -8828,11 +8834,11 @@ error:
H5Fclose(file);
} H5E_END_TRY;
return(1);
-} /* test_abs_fill_2nd_direct_fill_direct_skip_3rd_indirect_start_block_add_skipped() */
+} /* test_man_fill_2nd_direct_fill_direct_skip_3rd_indirect_start_block_add_skipped() */
/*-------------------------------------------------------------------------
- * Function: test_abs_fill_2nd_direct_fill_direct_skip2_3rd_indirect_start_block_add_skipped
+ * Function: test_man_fill_2nd_direct_fill_direct_skip2_3rd_indirect_start_block_add_skipped
*
* Purpose: Test filling all direct blocks in root indirect block and all
* direct blocks in 2nd level indirect blocks, fill all direct
@@ -8852,7 +8858,7 @@ error:
*-------------------------------------------------------------------------
*/
static int
-test_abs_fill_2nd_direct_fill_direct_skip2_3rd_indirect_start_block_add_skipped(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
+test_man_fill_2nd_direct_fill_direct_skip2_3rd_indirect_start_block_add_skipped(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
hid_t file = -1; /* File ID */
hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
@@ -8917,7 +8923,7 @@ HDfprintf(stderr, "num_first_indirect_rows = %u\n", num_first_indirect_rows);
HDfprintf(stderr, "obj_size = %Zu\n", obj_size);
#endif /* QAK */
state.man_alloc_size += DBLOCK_SIZE(fh, num_first_indirect_rows + 1);
- if(add_obj(fh, dxpl, 20, obj_size, &state, &keep_ids))
+ if(add_obj(fh, dxpl, (size_t)20, obj_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
@@ -8929,7 +8935,7 @@ HDfprintf(stderr, "obj_size = %Zu\n", obj_size);
#ifdef QAK
HDfprintf(stderr, "obj_size = %Zu\n", obj_size);
#endif /* QAK */
- if(add_obj(fh, dxpl, 20, obj_size, &state, &keep_ids))
+ if(add_obj(fh, dxpl, (size_t)20, obj_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
@@ -8962,7 +8968,7 @@ HDfprintf(stderr, "obj_size = %Zu\n", obj_size);
/* Add one more object, to create another "large" block */
obj_size = SMALL_OBJ_SIZE1;
state.man_alloc_size += DBLOCK_SIZE(fh, num_first_indirect_rows + 1);
- if(add_obj(fh, dxpl, 10, obj_size, &state, &keep_ids))
+ if(add_obj(fh, dxpl, (size_t)10, obj_size, &state, &keep_ids))
TEST_ERROR
@@ -8990,11 +8996,11 @@ error:
H5Fclose(file);
} H5E_END_TRY;
return(1);
-} /* test_abs_fill_2nd_direct_fill_direct_skip2_3rd_indirect_start_block_add_skipped() */
+} /* test_man_fill_2nd_direct_fill_direct_skip2_3rd_indirect_start_block_add_skipped() */
/*-------------------------------------------------------------------------
- * Function: test_abs_fill_3rd_direct_less_one_fill_direct_wrap_start_block_add_skipped
+ * Function: test_man_fill_3rd_direct_less_one_fill_direct_wrap_start_block_add_skipped
*
* Purpose: Test filling all direct blocks in root indirect block and all
* direct blocks in 2nd level indirect blocks, all 3rd level
@@ -9015,7 +9021,7 @@ error:
*-------------------------------------------------------------------------
*/
static int
-test_abs_fill_3rd_direct_less_one_fill_direct_wrap_start_block_add_skipped(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
+test_man_fill_3rd_direct_less_one_fill_direct_wrap_start_block_add_skipped(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
hid_t file = -1; /* File ID */
hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
@@ -9087,7 +9093,7 @@ test_abs_fill_3rd_direct_less_one_fill_direct_wrap_start_block_add_skipped(hid_t
HDfprintf(stderr, "obj_size = %Zu\n", obj_size);
#endif /* QAK */
state.man_alloc_size += DBLOCK_SIZE(fh, num_first_indirect_rows);
- if(add_obj(fh, dxpl, 20, obj_size, &state, &keep_ids))
+ if(add_obj(fh, dxpl, (size_t)20, obj_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
@@ -9096,7 +9102,7 @@ HDfprintf(stderr, "obj_size = %Zu\n", obj_size);
/* Insert object to fill space in (large) block created */
obj_size = DBLOCK_FREE(fh, num_first_indirect_rows) - obj_size;
- if(add_obj(fh, dxpl, 20, obj_size, &state, &keep_ids))
+ if(add_obj(fh, dxpl, (size_t)20, obj_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
@@ -9124,7 +9130,7 @@ HDfprintf(stderr, "obj_size = %Zu\n", obj_size);
/* Add one more object, to create another "large" block */
obj_size = SMALL_OBJ_SIZE1;
state.man_alloc_size += DBLOCK_SIZE(fh, num_first_indirect_rows);
- if(add_obj(fh, dxpl, 10, obj_size, &state, &keep_ids))
+ if(add_obj(fh, dxpl, (size_t)10, obj_size, &state, &keep_ids))
TEST_ERROR
@@ -9152,11 +9158,11 @@ error:
H5Fclose(file);
} H5E_END_TRY;
return(1);
-} /* test_abs_fill_3rd_direct_less_one_fill_direct_wrap_start_block_add_skipped() */
+} /* test_man_fill_3rd_direct_less_one_fill_direct_wrap_start_block_add_skipped() */
/*-------------------------------------------------------------------------
- * Function: test_abs_fill_1st_row_3rd_direct_fill_2nd_direct_less_one_wrap_start_block_add_skipped
+ * Function: test_man_fill_1st_row_3rd_direct_fill_2nd_direct_less_one_wrap_start_block_add_skipped
*
* Purpose: Test filling all direct blocks in root indirect block and all
* direct blocks in 2nd level indirect blocks, all 3rd level
@@ -9178,7 +9184,7 @@ error:
*-------------------------------------------------------------------------
*/
static int
-test_abs_fill_1st_row_3rd_direct_fill_2nd_direct_less_one_wrap_start_block_add_skipped(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
+test_man_fill_1st_row_3rd_direct_fill_2nd_direct_less_one_wrap_start_block_add_skipped(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
hid_t file = -1; /* File ID */
hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
@@ -9257,7 +9263,7 @@ test_abs_fill_1st_row_3rd_direct_fill_2nd_direct_less_one_wrap_start_block_add_s
HDfprintf(stderr, "obj_size = %Zu\n", obj_size);
#endif /* QAK */
state.man_alloc_size += DBLOCK_SIZE(fh, num_first_indirect_rows);
- if(add_obj(fh, dxpl, 20, obj_size, &state, &keep_ids))
+ if(add_obj(fh, dxpl, (size_t)20, obj_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
@@ -9266,7 +9272,7 @@ HDfprintf(stderr, "obj_size = %Zu\n", obj_size);
/* Insert object to fill space in (large) block created */
obj_size = DBLOCK_FREE(fh, num_first_indirect_rows) - obj_size;
- if(add_obj(fh, dxpl, 20, obj_size, &state, &keep_ids))
+ if(add_obj(fh, dxpl, (size_t)20, obj_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
@@ -9293,7 +9299,7 @@ HDfprintf(stderr, "obj_size = %Zu\n", obj_size);
/* Add one more object, to create another "large" block */
obj_size = SMALL_OBJ_SIZE1;
state.man_alloc_size += DBLOCK_SIZE(fh, num_first_indirect_rows);
- if(add_obj(fh, dxpl, 10, obj_size, &state, &keep_ids))
+ if(add_obj(fh, dxpl, (size_t)10, obj_size, &state, &keep_ids))
TEST_ERROR
@@ -9321,11 +9327,11 @@ error:
H5Fclose(file);
} H5E_END_TRY;
return(1);
-} /* test_abs_fill_1st_row_3rd_direct_fill_2nd_direct_less_one_wrap_start_block_add_skipped() */
+} /* test_man_fill_1st_row_3rd_direct_fill_2nd_direct_less_one_wrap_start_block_add_skipped() */
/*-------------------------------------------------------------------------
- * Function: test_abs_fill_3rd_direct_fill_direct_skip_start_block_add_skipped
+ * Function: test_man_fill_3rd_direct_fill_direct_skip_start_block_add_skipped
*
* Purpose: Test filling all direct blocks in root indirect block and all
* direct blocks in 2nd level indirect blocks, fill all direct
@@ -9345,7 +9351,7 @@ error:
*-------------------------------------------------------------------------
*/
static int
-test_abs_fill_3rd_direct_fill_direct_skip_start_block_add_skipped(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
+test_man_fill_3rd_direct_fill_direct_skip_start_block_add_skipped(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
hid_t file = -1; /* File ID */
hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
@@ -9415,7 +9421,7 @@ test_abs_fill_3rd_direct_fill_direct_skip_start_block_add_skipped(hid_t fapl, H5
HDfprintf(stderr, "obj_size = %Zu\n", obj_size);
#endif /* QAK */
state.man_alloc_size += DBLOCK_SIZE(fh, num_first_indirect_rows);
- if(add_obj(fh, dxpl, 20, obj_size, &state, &keep_ids))
+ if(add_obj(fh, dxpl, (size_t)20, obj_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
@@ -9424,7 +9430,7 @@ HDfprintf(stderr, "obj_size = %Zu\n", obj_size);
/* Insert object to fill space in (large) block created */
obj_size = DBLOCK_FREE(fh, num_first_indirect_rows) - obj_size;
- if(add_obj(fh, dxpl, 20, obj_size, &state, &keep_ids))
+ if(add_obj(fh, dxpl, (size_t)20, obj_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
@@ -9453,7 +9459,7 @@ HDfprintf(stderr, "obj_size = %Zu\n", obj_size);
/* Add one more object, to create another "large" block */
obj_size = SMALL_OBJ_SIZE1;
state.man_alloc_size += DBLOCK_SIZE(fh, num_first_indirect_rows);
- if(add_obj(fh, dxpl, 10, obj_size, &state, &keep_ids))
+ if(add_obj(fh, dxpl, (size_t)10, obj_size, &state, &keep_ids))
TEST_ERROR
@@ -9481,11 +9487,11 @@ error:
H5Fclose(file);
} H5E_END_TRY;
return(1);
-} /* test_abs_fill_3rd_direct_fill_direct_skip_start_block_add_skipped() */
+} /* test_man_fill_3rd_direct_fill_direct_skip_start_block_add_skipped() */
/*-------------------------------------------------------------------------
- * Function: test_abs_fill_3rd_direct_fill_2nd_direct_fill_direct_skip_3rd_indirect_start_block_add_skipped
+ * Function: test_man_fill_3rd_direct_fill_2nd_direct_fill_direct_skip_3rd_indirect_start_block_add_skipped
*
* Purpose: Test filling all direct blocks in root indirect block and all
* direct blocks in 2nd level indirect blocks, fill all direct
@@ -9507,7 +9513,7 @@ error:
*-------------------------------------------------------------------------
*/
static int
-test_abs_fill_3rd_direct_fill_2nd_direct_fill_direct_skip_3rd_indirect_start_block_add_skipped(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
+test_man_fill_3rd_direct_fill_2nd_direct_fill_direct_skip_3rd_indirect_start_block_add_skipped(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
hid_t file = -1; /* File ID */
hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
@@ -9593,7 +9599,7 @@ test_abs_fill_3rd_direct_fill_2nd_direct_fill_direct_skip_3rd_indirect_start_blo
HDfprintf(stderr, "obj_size = %Zu\n", obj_size);
#endif /* QAK */
state.man_alloc_size += DBLOCK_SIZE(fh, num_first_indirect_rows);
- if(add_obj(fh, dxpl, 20, obj_size, &state, &keep_ids))
+ if(add_obj(fh, dxpl, (size_t)20, obj_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
@@ -9602,7 +9608,7 @@ HDfprintf(stderr, "obj_size = %Zu\n", obj_size);
/* Insert object to fill space in (large) block created */
obj_size = DBLOCK_FREE(fh, num_first_indirect_rows) - obj_size;
- if(add_obj(fh, dxpl, 20, obj_size, &state, &keep_ids))
+ if(add_obj(fh, dxpl, (size_t)20, obj_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
@@ -9631,7 +9637,7 @@ HDfprintf(stderr, "obj_size = %Zu\n", obj_size);
/* Add one more object, to create another "large" block */
obj_size = SMALL_OBJ_SIZE1;
state.man_alloc_size += DBLOCK_SIZE(fh, num_first_indirect_rows);
- if(add_obj(fh, dxpl, 10, obj_size, &state, &keep_ids))
+ if(add_obj(fh, dxpl, (size_t)10, obj_size, &state, &keep_ids))
TEST_ERROR
@@ -9659,11 +9665,11 @@ error:
H5Fclose(file);
} H5E_END_TRY;
return(1);
-} /* test_abs_fill_3rd_direct_fill_2nd_direct_fill_direct_skip_3rd_indirect_start_block_add_skipped() */
+} /* test_man_fill_3rd_direct_fill_2nd_direct_fill_direct_skip_3rd_indirect_start_block_add_skipped() */
/*-------------------------------------------------------------------------
- * Function: test_abs_fill_3rd_direct_fill_2nd_direct_fill_direct_skip_3rd_indirect_two_rows_start_block_add_skipped
+ * Function: test_man_fill_3rd_direct_fill_2nd_direct_fill_direct_skip_3rd_indirect_two_rows_start_block_add_skipped
*
* Purpose: Test filling all direct blocks in root indirect block and all
* direct blocks in 2nd level indirect blocks, fill all direct
@@ -9687,7 +9693,7 @@ error:
*-------------------------------------------------------------------------
*/
static int
-test_abs_fill_3rd_direct_fill_2nd_direct_fill_direct_skip_3rd_indirect_two_rows_start_block_add_skipped(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
+test_man_fill_3rd_direct_fill_2nd_direct_fill_direct_skip_3rd_indirect_two_rows_start_block_add_skipped(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
hid_t file = -1; /* File ID */
hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
@@ -9806,7 +9812,7 @@ test_abs_fill_3rd_direct_fill_2nd_direct_fill_direct_skip_3rd_indirect_two_rows_
HDfprintf(stderr, "obj_size = %Zu\n", obj_size);
#endif /* QAK */
state.man_alloc_size += DBLOCK_SIZE(fh, num_first_indirect_rows);
- if(add_obj(fh, dxpl, 20, obj_size, &state, &keep_ids))
+ if(add_obj(fh, dxpl, (size_t)20, obj_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
@@ -9815,7 +9821,7 @@ HDfprintf(stderr, "obj_size = %Zu\n", obj_size);
/* Insert object to fill space in (large) block created */
obj_size = DBLOCK_FREE(fh, num_first_indirect_rows) - obj_size;
- if(add_obj(fh, dxpl, 20, obj_size, &state, &keep_ids))
+ if(add_obj(fh, dxpl, (size_t)20, obj_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
@@ -9844,7 +9850,7 @@ HDfprintf(stderr, "obj_size = %Zu\n", obj_size);
/* Add one more object, to create another "large" block */
obj_size = SMALL_OBJ_SIZE1;
state.man_alloc_size += DBLOCK_SIZE(fh, num_first_indirect_rows);
- if(add_obj(fh, dxpl, 10, obj_size, &state, &keep_ids))
+ if(add_obj(fh, dxpl, (size_t)10, obj_size, &state, &keep_ids))
TEST_ERROR
@@ -9872,11 +9878,11 @@ error:
H5Fclose(file);
} H5E_END_TRY;
return(1);
-} /* test_abs_fill_3rd_direct_fill_2nd_direct_fill_direct_skip_3rd_indirect_two_rows_start_block_add_skipped() */
+} /* test_man_fill_3rd_direct_fill_2nd_direct_fill_direct_skip_3rd_indirect_two_rows_start_block_add_skipped() */
/*-------------------------------------------------------------------------
- * Function: test_abs_fill_3rd_direct_fill_2nd_direct_fill_direct_skip_3rd_indirect_wrap_start_block_add_skipped
+ * Function: test_man_fill_3rd_direct_fill_2nd_direct_fill_direct_skip_3rd_indirect_wrap_start_block_add_skipped
*
* Purpose: Test filling all direct blocks in root indirect block and all
* direct blocks in 2nd level indirect blocks, fill all direct
@@ -9902,7 +9908,7 @@ error:
*-------------------------------------------------------------------------
*/
static int
-test_abs_fill_3rd_direct_fill_2nd_direct_fill_direct_skip_3rd_indirect_wrap_start_block_add_skipped(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
+test_man_fill_3rd_direct_fill_2nd_direct_fill_direct_skip_3rd_indirect_wrap_start_block_add_skipped(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
hid_t file = -1; /* File ID */
hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
@@ -10003,7 +10009,7 @@ test_abs_fill_3rd_direct_fill_2nd_direct_fill_direct_skip_3rd_indirect_wrap_star
HDfprintf(stderr, "obj_size = %Zu\n", obj_size);
#endif /* QAK */
state.man_alloc_size += DBLOCK_SIZE(fh, num_first_indirect_rows);
- if(add_obj(fh, dxpl, 20, obj_size, &state, &keep_ids))
+ if(add_obj(fh, dxpl, (size_t)20, obj_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
@@ -10012,7 +10018,7 @@ HDfprintf(stderr, "obj_size = %Zu\n", obj_size);
/* Insert object to fill space in (large) block created */
obj_size = DBLOCK_FREE(fh, num_first_indirect_rows) - obj_size;
- if(add_obj(fh, dxpl, 20, obj_size, &state, &keep_ids))
+ if(add_obj(fh, dxpl, (size_t)20, obj_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
@@ -10041,7 +10047,7 @@ HDfprintf(stderr, "obj_size = %Zu\n", obj_size);
/* Add one more object, to create another "large" block */
obj_size = SMALL_OBJ_SIZE1;
state.man_alloc_size += DBLOCK_SIZE(fh, num_first_indirect_rows);
- if(add_obj(fh, dxpl, 10, obj_size, &state, &keep_ids))
+ if(add_obj(fh, dxpl, (size_t)10, obj_size, &state, &keep_ids))
TEST_ERROR
@@ -10069,11 +10075,11 @@ error:
H5Fclose(file);
} H5E_END_TRY;
return(1);
-} /* test_abs_fill_3rd_direct_fill_2nd_direct_fill_direct_skip_3rd_indirect_wrap_start_block_add_skipped() */
+} /* test_man_fill_3rd_direct_fill_2nd_direct_fill_direct_skip_3rd_indirect_wrap_start_block_add_skipped() */
/*-------------------------------------------------------------------------
- * Function: test_abs_fill_4th_direct_less_one_fill_2nd_direct_fill_direct_skip_3rd_indirect_wrap_start_block_add_skipped
+ * Function: test_man_fill_4th_direct_less_one_fill_2nd_direct_fill_direct_skip_3rd_indirect_wrap_start_block_add_skipped
*
* Purpose: Test filling all direct blocks in root indirect block and all
* direct blocks in 2nd level indirect blocks, fill all direct
@@ -10099,7 +10105,7 @@ error:
*-------------------------------------------------------------------------
*/
static int
-test_abs_fill_4th_direct_less_one_fill_2nd_direct_fill_direct_skip_3rd_indirect_wrap_start_block_add_skipped(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
+test_man_fill_4th_direct_less_one_fill_2nd_direct_fill_direct_skip_3rd_indirect_wrap_start_block_add_skipped(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
hid_t file = -1; /* File ID */
hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
@@ -10236,7 +10242,7 @@ test_abs_fill_4th_direct_less_one_fill_2nd_direct_fill_direct_skip_3rd_indirect_
HDfprintf(stderr, "obj_size = %Zu\n", obj_size);
#endif /* QAK */
state.man_alloc_size += DBLOCK_SIZE(fh, num_first_indirect_rows);
- if(add_obj(fh, dxpl, 20, obj_size, &state, &keep_ids))
+ if(add_obj(fh, dxpl, (size_t)20, obj_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
@@ -10245,7 +10251,7 @@ HDfprintf(stderr, "obj_size = %Zu\n", obj_size);
/* Insert object to fill space in (large) block created */
obj_size = DBLOCK_FREE(fh, num_first_indirect_rows) - obj_size;
- if(add_obj(fh, dxpl, 20, obj_size, &state, &keep_ids))
+ if(add_obj(fh, dxpl, (size_t)20, obj_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
@@ -10274,7 +10280,7 @@ HDfprintf(stderr, "obj_size = %Zu\n", obj_size);
/* Add one more object, to create another "large" block */
obj_size = SMALL_OBJ_SIZE1;
state.man_alloc_size += DBLOCK_SIZE(fh, num_first_indirect_rows);
- if(add_obj(fh, dxpl, 10, obj_size, &state, &keep_ids))
+ if(add_obj(fh, dxpl, (size_t)10, obj_size, &state, &keep_ids))
TEST_ERROR
@@ -10302,13 +10308,13 @@ error:
H5Fclose(file);
} H5E_END_TRY;
return(1);
-} /* test_abs_fill_4th_direct_less_one_fill_2nd_direct_fill_direct_skip_3rd_indirect_wrap_start_block_add_skipped() */
+} /* test_man_fill_4th_direct_less_one_fill_2nd_direct_fill_direct_skip_3rd_indirect_wrap_start_block_add_skipped() */
#endif /* QAK */
#ifndef QAK
/*-------------------------------------------------------------------------
- * Function: test_abs_frag_simple
+ * Function: test_man_frag_simple
*
* Purpose: Test inserting objects small enough to fit into first row of
* direct blocks, but not to share a block with another object,
@@ -10327,7 +10333,7 @@ error:
*-------------------------------------------------------------------------
*/
static int
-test_abs_frag_simple(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
+test_man_frag_simple(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
hid_t file = -1; /* File ID */
hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
@@ -10360,7 +10366,7 @@ test_abs_frag_simple(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
state.man_free_space = DBLOCK_FREE(fh, 0);
for(u = 0; u < cparam->managed.width; u++) {
state.man_alloc_size += DBLOCK_SIZE(fh, 0);
- if(add_obj(fh, dxpl, 10, obj_size, &state, &keep_ids))
+ if(add_obj(fh, dxpl, (size_t)10, obj_size, &state, &keep_ids))
TEST_ERROR
if(u == 0) {
state.man_size = cparam->managed.width * DBLOCK_SIZE(fh, 0);
@@ -10371,7 +10377,7 @@ test_abs_frag_simple(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
state.man_free_space += DBLOCK_FREE(fh, 1) * cparam->managed.width;
for(u = 0; u < cparam->managed.width; u++) {
state.man_alloc_size += DBLOCK_SIZE(fh, 1);
- if(add_obj(fh, dxpl, 10, obj_size, &state, &keep_ids))
+ if(add_obj(fh, dxpl, (size_t)10, obj_size, &state, &keep_ids))
TEST_ERROR
} /* end for */
@@ -10387,7 +10393,7 @@ test_abs_frag_simple(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
/* Add one more object, to create a 2 * start_block_size block */
state.man_alloc_size += DBLOCK_SIZE(fh, 2);
- if(add_obj(fh, dxpl, 10, obj_size, &state, &keep_ids))
+ if(add_obj(fh, dxpl, (size_t)10, obj_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
@@ -10397,10 +10403,10 @@ test_abs_frag_simple(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
/* Go back and fill in direct blocks of initial block size (which have large free space in them) */
obj_size = DBLOCK_FREE(fh, 0) - obj_size;
for(u = 0; u < cparam->managed.width; u++)
- if(add_obj(fh, dxpl, 20, obj_size, &state, &keep_ids))
+ if(add_obj(fh, dxpl, (size_t)20, obj_size, &state, &keep_ids))
TEST_ERROR
for(u = 0; u < cparam->managed.width; u++)
- if(add_obj(fh, dxpl, 20, obj_size, &state, &keep_ids))
+ if(add_obj(fh, dxpl, (size_t)20, obj_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
@@ -10409,7 +10415,7 @@ test_abs_frag_simple(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
/* Fill in 2 * start_block_size block */
obj_size = DBLOCK_FREE(fh, 2) - (DBLOCK_SIZE(fh, 0) / 2);
- if(add_obj(fh, dxpl, 20, obj_size, &state, &keep_ids))
+ if(add_obj(fh, dxpl, (size_t)20, obj_size, &state, &keep_ids))
TEST_ERROR
@@ -10437,11 +10443,11 @@ error:
H5Fclose(file);
} H5E_END_TRY;
return(1);
-} /* test_abs_frag_simple() */
+} /* test_man_frag_simple() */
/*-------------------------------------------------------------------------
- * Function: test_abs_frag_direct
+ * Function: test_man_frag_direct
*
* Purpose: Test inserting small object to fit into each direct block
* in root block, but not to share a block with another object,
@@ -10459,7 +10465,7 @@ error:
*-------------------------------------------------------------------------
*/
static int
-test_abs_frag_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
+test_man_frag_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
hid_t file = -1; /* File ID */
hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
@@ -10496,7 +10502,7 @@ test_abs_frag_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
/* First row */
for(u = 0; u < cparam->managed.width; u++) {
state.man_alloc_size += DBLOCK_SIZE(fh, 0);
- if(add_obj(fh, dxpl, 10, obj_size, &state, &keep_ids))
+ if(add_obj(fh, dxpl, (size_t)10, obj_size, &state, &keep_ids))
TEST_ERROR
if(u == 0) {
state.man_size = cparam->managed.width * DBLOCK_SIZE(fh, 0);
@@ -10508,7 +10514,7 @@ test_abs_frag_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
/* Second row */
for(u = 0; u < cparam->managed.width; u++) {
state.man_alloc_size += DBLOCK_SIZE(fh, 1);
- if(add_obj(fh, dxpl, 10, obj_size, &state, &keep_ids))
+ if(add_obj(fh, dxpl, (size_t)10, obj_size, &state, &keep_ids))
TEST_ERROR
} /* end for */
@@ -10527,7 +10533,7 @@ test_abs_frag_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
obj_size = DBLOCK_SIZE(fh, u + 2) / 2;
for(v = 0; v < cparam->managed.width; v++) {
state.man_alloc_size += DBLOCK_SIZE(fh, u + 2);
- if(add_obj(fh, dxpl, 10, obj_size, &state, &keep_ids))
+ if(add_obj(fh, dxpl, (size_t)10, obj_size, &state, &keep_ids))
TEST_ERROR
} /* end for */
} /* end for */
@@ -10547,7 +10553,7 @@ test_abs_frag_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
obj_size = DBLOCK_SIZE(fh, u + 4) / 2;
for(v = 0; v < cparam->managed.width; v++) {
state.man_alloc_size += DBLOCK_SIZE(fh, u + 4);
- if(add_obj(fh, dxpl, 10, obj_size, &state, &keep_ids))
+ if(add_obj(fh, dxpl, (size_t)10, obj_size, &state, &keep_ids))
TEST_ERROR
} /* end for */
} /* end for */
@@ -10566,7 +10572,7 @@ test_abs_frag_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
obj_size = DBLOCK_SIZE(fh, 8) / 2;
for(v = 0; v < cparam->managed.width; v++) {
state.man_alloc_size += DBLOCK_SIZE(fh, 8);
- if(add_obj(fh, dxpl, 10, obj_size, &state, &keep_ids))
+ if(add_obj(fh, dxpl, (size_t)10, obj_size, &state, &keep_ids))
TEST_ERROR
} /* end for */
@@ -10578,7 +10584,7 @@ test_abs_frag_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
for(u = 0; u < root_direct_rows; u++) {
obj_size = DBLOCK_FREE(fh, u) - (DBLOCK_SIZE(fh, u) / 2);
for(v = 0; v < cparam->managed.width; v++)
- if(add_obj(fh, dxpl, 20, obj_size, &state, &keep_ids))
+ if(add_obj(fh, dxpl, (size_t)20, obj_size, &state, &keep_ids))
TEST_ERROR
} /* end for */
@@ -10607,11 +10613,11 @@ error:
H5Fclose(file);
} H5E_END_TRY;
return(1);
-} /* test_abs_frag_direct() */
+} /* test_man_frag_direct() */
/*-------------------------------------------------------------------------
- * Function: test_abs_frag_2nd_direct
+ * Function: test_man_frag_2nd_direct
*
* Purpose: Test filling all direct blocks in root indirect block, then
* inserting small object to fit into each direct block
@@ -10631,7 +10637,7 @@ error:
*-------------------------------------------------------------------------
*/
static int
-test_abs_frag_2nd_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
+test_man_frag_2nd_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
hid_t file = -1; /* File ID */
hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
@@ -10678,7 +10684,7 @@ HDfprintf(stderr, "num_first_indirect_rows = %u\n", num_first_indirect_rows);
obj_size = DBLOCK_SIZE(fh, u) / 2;
for(v = 0; v < cparam->managed.width; v++) {
state.man_alloc_size += DBLOCK_SIZE(fh, u);
- if(add_obj(fh, dxpl, 10, obj_size, &state, &keep_ids))
+ if(add_obj(fh, dxpl, (size_t)10, obj_size, &state, &keep_ids))
TEST_ERROR
} /* end for */
} /* end for */
@@ -10691,7 +10697,7 @@ HDfprintf(stderr, "num_first_indirect_rows = %u\n", num_first_indirect_rows);
for(u = 0; u < num_first_indirect_rows; u++) {
obj_size = DBLOCK_FREE(fh, u) - (DBLOCK_SIZE(fh, u) / 2);
for(v = 0; v < cparam->managed.width; v++)
- if(add_obj(fh, dxpl, 20, obj_size, &state, &keep_ids))
+ if(add_obj(fh, dxpl, (size_t)20, obj_size, &state, &keep_ids))
TEST_ERROR
} /* end for */
@@ -10720,11 +10726,11 @@ error:
H5Fclose(file);
} H5E_END_TRY;
return(1);
-} /* test_abs_frag_2nd_direct() */
+} /* test_man_frag_2nd_direct() */
/*-------------------------------------------------------------------------
- * Function: test_abs_frag_3rd_direct
+ * Function: test_man_frag_3rd_direct
*
* Purpose: Test filling all direct blocks in root indirect block and
* all 2nd level indirect blocks, then
@@ -10745,7 +10751,7 @@ error:
*-------------------------------------------------------------------------
*/
static int
-test_abs_frag_3rd_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
+test_man_frag_3rd_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
hid_t file = -1; /* File ID */
hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
@@ -10797,7 +10803,7 @@ test_abs_frag_3rd_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *
obj_size = DBLOCK_SIZE(fh, u) / 2;
for(v = 0; v < cparam->managed.width; v++) {
state.man_alloc_size += DBLOCK_SIZE(fh, u);
- if(add_obj(fh, dxpl, 10, obj_size, &state, &keep_ids))
+ if(add_obj(fh, dxpl, (size_t)10, obj_size, &state, &keep_ids))
TEST_ERROR
} /* end for */
} /* end for */
@@ -10810,7 +10816,7 @@ test_abs_frag_3rd_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *
for(u = 0; u < root_direct_rows; u++) {
obj_size = DBLOCK_FREE(fh, u) - (DBLOCK_SIZE(fh, u) / 2);
for(v = 0; v < cparam->managed.width; v++)
- if(add_obj(fh, dxpl, 20, obj_size, &state, &keep_ids))
+ if(add_obj(fh, dxpl, (size_t)20, obj_size, &state, &keep_ids))
TEST_ERROR
} /* end for */
@@ -10839,13 +10845,13 @@ error:
H5Fclose(file);
} H5E_END_TRY;
return(1);
-} /* test_abs_frag_3rd_direct() */
+} /* test_man_frag_3rd_direct() */
#endif /* QAK */
#ifndef QAK
/*-------------------------------------------------------------------------
- * Function: test_abs_random_managed
+ * Function: test_man_random
*
* Purpose: Test inserting random sized objects (that are smaller than
* the standalone size) into a heap, and read them back.
@@ -10862,7 +10868,7 @@ error:
*-------------------------------------------------------------------------
*/
static int
-test_abs_random_managed(hsize_t size_limit, hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
+test_man_random(hsize_t size_limit, hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
hid_t file = -1; /* File ID */
hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
@@ -10939,9 +10945,9 @@ HDfprintf(stderr, "keep_ids.num_ids = %Zu, total_obj_added = %Hu, size_limit = %
/* Swap current position with future position */
/* (just swap the heap ID, the len & offset isn't used */
- HDmemcpy(temp_id, &keep_ids.ids[u * HEAP_ID_LEN], HEAP_ID_LEN);
- HDmemcpy(&keep_ids.ids[u * HEAP_ID_LEN], &keep_ids.ids[(u + pos) * HEAP_ID_LEN], HEAP_ID_LEN);
- HDmemcpy(&keep_ids.ids[(u + pos) * HEAP_ID_LEN], temp_id, HEAP_ID_LEN);
+ HDmemcpy(temp_id, &keep_ids.ids[u * HEAP_ID_LEN], (size_t)HEAP_ID_LEN);
+ HDmemcpy(&keep_ids.ids[u * HEAP_ID_LEN], &keep_ids.ids[(u + pos) * HEAP_ID_LEN], (size_t)HEAP_ID_LEN);
+ HDmemcpy(&keep_ids.ids[(u + pos) * HEAP_ID_LEN], temp_id, (size_t)HEAP_ID_LEN);
} /* end if */
} /* end for */
@@ -11011,11 +11017,11 @@ error:
H5Fclose(file);
} H5E_END_TRY;
return(1);
-} /* test_abs_random_managed() */
+} /* test_man_random() */
/*-------------------------------------------------------------------------
- * Function: test_abs_random_pow2_managed
+ * Function: test_man_random_pow2
*
* Purpose: Test inserting random sized objects (that are smaller than the
* standalone size) with a "power of 2 distribution" into a heap,
@@ -11033,7 +11039,7 @@ error:
*-------------------------------------------------------------------------
*/
static int
-test_abs_random_pow2_managed(hsize_t size_limit, hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
+test_man_random_pow2(hsize_t size_limit, hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
hid_t file = -1; /* File ID */
hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
@@ -11122,9 +11128,9 @@ HDfprintf(stderr, "keep_ids.num_ids = %Zu, total_obj_added = %Hu, size_limit = %
/* Swap current position with future position */
/* (just swap the heap ID, the len & offset isn't used */
- HDmemcpy(temp_id, &keep_ids.ids[u * HEAP_ID_LEN], HEAP_ID_LEN);
- HDmemcpy(&keep_ids.ids[u * HEAP_ID_LEN], &keep_ids.ids[(u + pos) * HEAP_ID_LEN], HEAP_ID_LEN);
- HDmemcpy(&keep_ids.ids[(u + pos) * HEAP_ID_LEN], temp_id, HEAP_ID_LEN);
+ HDmemcpy(temp_id, &keep_ids.ids[u * HEAP_ID_LEN], (size_t)HEAP_ID_LEN);
+ HDmemcpy(&keep_ids.ids[u * HEAP_ID_LEN], &keep_ids.ids[(u + pos) * HEAP_ID_LEN], (size_t)HEAP_ID_LEN);
+ HDmemcpy(&keep_ids.ids[(u + pos) * HEAP_ID_LEN], temp_id, (size_t)HEAP_ID_LEN);
} /* end if */
} /* end for */
@@ -11194,9 +11200,154 @@ error:
H5Fclose(file);
} H5E_END_TRY;
return(1);
-} /* test_abs_random_pow2_managed() */
+} /* test_man_random_pow2() */
+#endif /* QAK */
+#endif /* QAK2 */
+
+
+/*-------------------------------------------------------------------------
+ * Function: test_huge_insert_one
+ *
+ * Purpose: Test inserting one huge object in the heap
+ *
+ * Then, remove all the objects, in various ways
+ *
+ * Return: Success: 0
+ * Failure: 1
+ *
+ * Programmer: Quincey Koziol
+ * Monday, August 7, 2006
+ *
+ *-------------------------------------------------------------------------
+ */
+static int
+test_huge_insert_one(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
+{
+ hid_t file = -1; /* File ID */
+ hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
+ char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
+ H5F_t *f = NULL; /* Internal file object pointer */
+ H5HF_t *fh = NULL; /* Fractal heap wrapper */
+ haddr_t fh_addr; /* Address of fractal heap */
+ fheap_heap_ids_t keep_ids; /* Structure to retain heap IDs */
+ off_t empty_size; /* Size of a file with an empty heap */
+ off_t file_size; /* Size of file currently */
+ unsigned char heap_id[HEAP_ID_LEN]; /* Heap ID for object */
+ unsigned char *obj = NULL; /* Buffer for object to insert */
+ unsigned char *robj = NULL; /* Buffer for object read */
+ size_t obj_size; /* Size of object */
+ size_t robj_size; /* Size of object read */
+ fheap_heap_state_t state; /* State of fractal heap */
+ const char *base_desc = "insert one huge object, then remove %s"; /* Test description */
+
+ /* Perform common file & heap open operations */
+ if(open_heap(filename, fapl, dxpl, cparam, tparam, &file, &f, &fh, &fh_addr, &state, &empty_size) < 0)
+ TEST_ERROR
+
+ /* Perform common test initialization operations */
+ if(begin_test(tparam, base_desc, &keep_ids, NULL) < 0)
+ TEST_ERROR
+
+ /* Allocate space for the object */
+ obj_size = SMALL_STAND_SIZE + 1;
+ obj = H5MM_malloc(obj_size);
+ robj = H5MM_malloc(obj_size);
+
+ /* Insert object too large for managed heap blocks */
+ if(H5HF_insert(fh, dxpl, obj_size, obj, &heap_id) < 0)
+ FAIL_STACK_ERROR
+
+ /* Check for closing & re-opening the heap */
+ if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ TEST_ERROR
+
+ /* Check up on heap... */
+ state.huge_size = obj_size;
+ state.huge_nobjs = 1;
+ if(check_stats(fh, &state))
+ TEST_ERROR
+
+ /* Read in huge object */
+ if(H5HF_get_obj_len(fh, dxpl, heap_id, &robj_size) < 0)
+ FAIL_STACK_ERROR
+ if(obj_size != robj_size)
+ TEST_ERROR
+ if(H5HF_read(fh, dxpl, heap_id, robj) < 0)
+ FAIL_STACK_ERROR
+ if(HDmemcmp(obj, robj, obj_size))
+ TEST_ERROR
+
+ /* Delete individual objects, if we won't be deleting the entire heap later */
+ if(tparam->del_dir != FHEAP_DEL_HEAP) {
+ /* Remove object from heap */
+ if(H5HF_remove(fh, dxpl, heap_id) < 0)
+ FAIL_STACK_ERROR
+
+ /* Check for closing & re-opening the heap */
+ if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ TEST_ERROR
+
+ /* Check up on heap... */
+ state.huge_size = 0;
+ state.huge_nobjs = 0;
+ if(check_stats(fh, &state))
+ TEST_ERROR
+ } /* end if */
+
+
+ /* Close the fractal heap */
+ if(H5HF_close(fh, dxpl) < 0)
+ FAIL_STACK_ERROR
+ fh = NULL;
+
+ /* Check for deleting the entire heap */
+ if(tparam->del_dir == FHEAP_DEL_HEAP) {
+ /* Delete heap */
+ if(H5HF_delete(f, dxpl, fh_addr) < 0)
+ FAIL_STACK_ERROR
+ } /* end if */
+
+ /* Close the file */
+ if(H5Fclose(file) < 0)
+ FAIL_STACK_ERROR
+
+ /* Get the size of the file */
+ if((file_size = h5_get_file_size(filename)) == 0)
+ TEST_ERROR
+#ifdef QAK
+HDfprintf(stderr, "file_size = %lu\n", (unsigned long)file_size);
#endif /* QAK */
+ /* Verify the file is correct size */
+ if(file_size != empty_size)
+ TEST_ERROR
+
+ /* Free resources */
+ H5MM_xfree(keep_ids.ids);
+ H5MM_xfree(keep_ids.lens);
+ H5MM_xfree(keep_ids.offs);
+ H5MM_xfree(obj);
+ H5MM_xfree(robj);
+
+ /* All tests passed */
+ PASSED()
+
+ return(0);
+
+error:
+ H5E_BEGIN_TRY {
+ H5MM_xfree(keep_ids.ids);
+ H5MM_xfree(keep_ids.lens);
+ H5MM_xfree(keep_ids.offs);
+ H5MM_xfree(obj);
+ H5MM_xfree(robj);
+ if(fh)
+ H5HF_close(fh, dxpl);
+ H5Fclose(file);
+ } H5E_END_TRY;
+ return(1);
+} /* test_huge_insert_one() */
+
/*-------------------------------------------------------------------------
* Function: main
@@ -11282,6 +11433,7 @@ curr_test = FHEAP_TEST_REOPEN;
nerrors += test_create(fapl, &cparam, &tparam);
nerrors += test_reopen(fapl, &cparam, &tparam);
+#ifndef QAK2
#ifndef QAK
{
fheap_test_fill_t fill; /* Size of objects to fill heap blocks with */
@@ -11314,47 +11466,47 @@ fill = FHEAP_TEST_FILL_LARGE;
} /* end switch */
/*
- * Test fractal heap object insertion
+ * Test fractal heap managed object insertion
*/
#ifdef ALL_INSERT_TESTS
/* Simple insertion */
- nerrors += test_abs_insert_first(fapl, &cparam, &tparam);
- nerrors += test_abs_insert_second(fapl, &cparam, &tparam);
- nerrors += test_abs_insert_root_mult(fapl, &cparam, &tparam);
- nerrors += test_abs_insert_force_indirect(fapl, &cparam, &tparam);
- nerrors += test_abs_insert_fill_second(fapl, &cparam, &tparam);
- nerrors += test_abs_insert_third_direct(fapl, &cparam, &tparam);
- nerrors += test_abs_fill_first_row(fapl, &cparam, &tparam);
- nerrors += test_abs_start_second_row(fapl, &cparam, &tparam);
- nerrors += test_abs_fill_second_row(fapl, &cparam, &tparam);
- nerrors += test_abs_start_third_row(fapl, &cparam, &tparam);
- nerrors += test_abs_fill_fourth_row(fapl, &cparam, &tparam);
- nerrors += test_abs_fill_all_root_direct(fapl, &cparam, &tparam);
- nerrors += test_abs_first_recursive_indirect(fapl, &cparam, &tparam);
- nerrors += test_abs_second_direct_recursive_indirect(fapl, &cparam, &tparam);
- nerrors += test_abs_fill_first_recursive_indirect(fapl, &cparam, &tparam);
- nerrors += test_abs_second_recursive_indirect(fapl, &cparam, &tparam);
- nerrors += test_abs_fill_second_recursive_indirect(fapl, &cparam, &tparam);
- nerrors += test_abs_fill_recursive_indirect_row(fapl, &cparam, &tparam);
- nerrors += test_abs_start_2nd_recursive_indirect(fapl, &cparam, &tparam);
- nerrors += test_abs_recursive_indirect_two_deep(fapl, &cparam, &tparam);
- nerrors += test_abs_start_3rd_recursive_indirect(fapl, &cparam, &tparam);
- nerrors += test_abs_fill_first_3rd_recursive_indirect(fapl, &cparam, &tparam);
- nerrors += test_abs_fill_3rd_recursive_indirect_row(fapl, &cparam, &tparam);
- nerrors += test_abs_fill_all_3rd_recursive_indirect(fapl, &cparam, &tparam);
- nerrors += test_abs_start_4th_recursive_indirect(fapl, &cparam, &tparam);
- nerrors += test_abs_fill_first_4th_recursive_indirect(fapl, &cparam, &tparam);
- nerrors += test_abs_fill_4th_recursive_indirect_row(fapl, &cparam, &tparam);
- nerrors += test_abs_fill_all_4th_recursive_indirect(fapl, &cparam, &tparam);
+ nerrors += test_man_insert_first(fapl, &cparam, &tparam);
+ nerrors += test_man_insert_second(fapl, &cparam, &tparam);
+ nerrors += test_man_insert_root_mult(fapl, &cparam, &tparam);
+ nerrors += test_man_insert_force_indirect(fapl, &cparam, &tparam);
+ nerrors += test_man_insert_fill_second(fapl, &cparam, &tparam);
+ nerrors += test_man_insert_third_direct(fapl, &cparam, &tparam);
+ nerrors += test_man_fill_first_row(fapl, &cparam, &tparam);
+ nerrors += test_man_start_second_row(fapl, &cparam, &tparam);
+ nerrors += test_man_fill_second_row(fapl, &cparam, &tparam);
+ nerrors += test_man_start_third_row(fapl, &cparam, &tparam);
+ nerrors += test_man_fill_fourth_row(fapl, &cparam, &tparam);
+ nerrors += test_man_fill_all_root_direct(fapl, &cparam, &tparam);
+ nerrors += test_man_first_recursive_indirect(fapl, &cparam, &tparam);
+ nerrors += test_man_second_direct_recursive_indirect(fapl, &cparam, &tparam);
+ nerrors += test_man_fill_first_recursive_indirect(fapl, &cparam, &tparam);
+ nerrors += test_man_second_recursive_indirect(fapl, &cparam, &tparam);
+ nerrors += test_man_fill_second_recursive_indirect(fapl, &cparam, &tparam);
+ nerrors += test_man_fill_recursive_indirect_row(fapl, &cparam, &tparam);
+ nerrors += test_man_start_2nd_recursive_indirect(fapl, &cparam, &tparam);
+ nerrors += test_man_recursive_indirect_two_deep(fapl, &cparam, &tparam);
+ nerrors += test_man_start_3rd_recursive_indirect(fapl, &cparam, &tparam);
+ nerrors += test_man_fill_first_3rd_recursive_indirect(fapl, &cparam, &tparam);
+ nerrors += test_man_fill_3rd_recursive_indirect_row(fapl, &cparam, &tparam);
+ nerrors += test_man_fill_all_3rd_recursive_indirect(fapl, &cparam, &tparam);
+ nerrors += test_man_start_4th_recursive_indirect(fapl, &cparam, &tparam);
+ nerrors += test_man_fill_first_4th_recursive_indirect(fapl, &cparam, &tparam);
+ nerrors += test_man_fill_4th_recursive_indirect_row(fapl, &cparam, &tparam);
+ nerrors += test_man_fill_all_4th_recursive_indirect(fapl, &cparam, &tparam);
#endif /* ALL_INSERT_TESTS */
/* If this test fails, uncomment the tests above, which build up to this
* level of complexity gradually. -QAK
*/
#ifndef QAK
if (ExpressMode > 1)
- printf("***Express test mode on. test_abs_start_5th_recursive_indirect is skipped\n");
+ printf("***Express test mode on. test_man_start_5th_recursive_indirect is skipped\n");
else
- nerrors += test_abs_start_5th_recursive_indirect(fapl, &cparam, &tparam);
+ nerrors += test_man_start_5th_recursive_indirect(fapl, &cparam, &tparam);
#else /* QAK */
HDfprintf(stderr, "Uncomment tests!\n");
#endif /* QAK */
@@ -11364,18 +11516,18 @@ HDfprintf(stderr, "Uncomment tests!\n");
*/
/* Simple removal */
#ifndef QAK
- nerrors += test_abs_remove_bogus(fapl, &cparam, &tparam);
- nerrors += test_abs_remove_one(fapl, &cparam, &tparam);
- nerrors += test_abs_remove_two(fapl, &cparam, &tparam);
- nerrors += test_abs_remove_one_larger(fapl, &cparam, &tparam);
+ nerrors += test_man_remove_bogus(fapl, &cparam, &tparam);
+ nerrors += test_man_remove_one(fapl, &cparam, &tparam);
+ nerrors += test_man_remove_two(fapl, &cparam, &tparam);
+ nerrors += test_man_remove_one_larger(fapl, &cparam, &tparam);
tparam.del_dir = FHEAP_DEL_FORWARD;
- nerrors += test_abs_remove_two_larger(fapl, &cparam, &tparam);
+ nerrors += test_man_remove_two_larger(fapl, &cparam, &tparam);
tparam.del_dir = FHEAP_DEL_REVERSE;
- nerrors += test_abs_remove_two_larger(fapl, &cparam, &tparam);
+ nerrors += test_man_remove_two_larger(fapl, &cparam, &tparam);
tparam.del_dir = FHEAP_DEL_FORWARD;
- nerrors += test_abs_remove_three_larger(fapl, &cparam, &tparam);
+ nerrors += test_man_remove_three_larger(fapl, &cparam, &tparam);
tparam.del_dir = FHEAP_DEL_REVERSE;
- nerrors += test_abs_remove_three_larger(fapl, &cparam, &tparam);
+ nerrors += test_man_remove_three_larger(fapl, &cparam, &tparam);
#else /* QAK */
HDfprintf(stderr, "Uncomment tests!\n");
#endif /* QAK */
@@ -11405,51 +11557,51 @@ tparam.drain_half = FHEAP_DEL_DRAIN_ALL;
#ifndef QAK
/* Simple insertion patterns */
- nerrors += test_abs_remove_root_direct(fapl, &cparam, &tparam);
- nerrors += test_abs_remove_two_direct(fapl, &cparam, &tparam);
- nerrors += test_abs_remove_first_row(fapl, &cparam, &tparam);
- nerrors += test_abs_remove_first_two_rows(fapl, &cparam, &tparam);
- nerrors += test_abs_remove_first_four_rows(fapl, &cparam, &tparam);
+ nerrors += test_man_remove_root_direct(fapl, &cparam, &tparam);
+ nerrors += test_man_remove_two_direct(fapl, &cparam, &tparam);
+ nerrors += test_man_remove_first_row(fapl, &cparam, &tparam);
+ nerrors += test_man_remove_first_two_rows(fapl, &cparam, &tparam);
+ nerrors += test_man_remove_first_four_rows(fapl, &cparam, &tparam);
if (ExpressMode > 1)
printf("***Express test mode on. Some tests skipped\n");
else {
- nerrors += test_abs_remove_all_root_direct(fapl, &cparam, &tparam);
- nerrors += test_abs_remove_2nd_indirect(fapl, &cparam, &tparam);
- nerrors += test_abs_remove_3rd_indirect(fapl, &cparam, &tparam);
+ nerrors += test_man_remove_all_root_direct(fapl, &cparam, &tparam);
+ nerrors += test_man_remove_2nd_indirect(fapl, &cparam, &tparam);
+ nerrors += test_man_remove_3rd_indirect(fapl, &cparam, &tparam);
} /* end else */
#endif /* QAK */
#ifndef QAK
/* Skip blocks insertion */
/* (covers insertion & deletion of skipped blocks) */
- nerrors += test_abs_skip_start_block(fapl, &cparam, &tparam);
- nerrors += test_abs_skip_start_block_add_back(fapl, &cparam, &tparam);
- nerrors += test_abs_skip_start_block_add_skipped(fapl, &cparam, &tparam);
- nerrors += test_abs_skip_2nd_block(fapl, &cparam, &tparam);
- nerrors += test_abs_skip_2nd_block_add_skipped(fapl, &cparam, &tparam);
- nerrors += test_abs_fill_one_partial_skip_2nd_block_add_skipped(fapl, &cparam, &tparam);
- nerrors += test_abs_fill_row_skip_add_skipped(fapl, &cparam, &tparam);
- nerrors += test_abs_skip_direct_skip_indirect_two_rows_add_skipped(fapl, &cparam, &tparam);
- nerrors += test_abs_fill_direct_skip_indirect_start_block_add_skipped(fapl, &cparam, &tparam);
- nerrors += test_abs_fill_direct_skip_2nd_indirect_start_block_add_skipped(fapl, &cparam, &tparam);
- nerrors += test_abs_fill_2nd_direct_less_one_wrap_start_block_add_skipped(fapl, &cparam, &tparam);
- nerrors += test_abs_fill_direct_skip_2nd_indirect_skip_2nd_block_add_skipped(fapl, &cparam, &tparam);
- nerrors += test_abs_fill_direct_skip_indirect_two_rows_add_skipped(fapl, &cparam, &tparam);
- nerrors += test_abs_fill_direct_skip_indirect_two_rows_skip_indirect_row_add_skipped(fapl, &cparam, &tparam);
- nerrors += test_abs_fill_2nd_direct_skip_start_block_add_skipped(fapl, &cparam, &tparam);
- nerrors += test_abs_fill_2nd_direct_skip_2nd_indirect_start_block_add_skipped(fapl, &cparam, &tparam);
- nerrors += test_abs_fill_2nd_direct_fill_direct_skip_3rd_indirect_start_block_add_skipped(fapl, &cparam, &tparam);
- nerrors += test_abs_fill_2nd_direct_fill_direct_skip2_3rd_indirect_start_block_add_skipped(fapl, &cparam, &tparam);
- nerrors += test_abs_fill_3rd_direct_less_one_fill_direct_wrap_start_block_add_skipped(fapl, &cparam, &tparam);
- nerrors += test_abs_fill_1st_row_3rd_direct_fill_2nd_direct_less_one_wrap_start_block_add_skipped(fapl, &cparam, &tparam);
+ nerrors += test_man_skip_start_block(fapl, &cparam, &tparam);
+ nerrors += test_man_skip_start_block_add_back(fapl, &cparam, &tparam);
+ nerrors += test_man_skip_start_block_add_skipped(fapl, &cparam, &tparam);
+ nerrors += test_man_skip_2nd_block(fapl, &cparam, &tparam);
+ nerrors += test_man_skip_2nd_block_add_skipped(fapl, &cparam, &tparam);
+ nerrors += test_man_fill_one_partial_skip_2nd_block_add_skipped(fapl, &cparam, &tparam);
+ nerrors += test_man_fill_row_skip_add_skipped(fapl, &cparam, &tparam);
+ nerrors += test_man_skip_direct_skip_indirect_two_rows_add_skipped(fapl, &cparam, &tparam);
+ nerrors += test_man_fill_direct_skip_indirect_start_block_add_skipped(fapl, &cparam, &tparam);
+ nerrors += test_man_fill_direct_skip_2nd_indirect_start_block_add_skipped(fapl, &cparam, &tparam);
+ nerrors += test_man_fill_2nd_direct_less_one_wrap_start_block_add_skipped(fapl, &cparam, &tparam);
+ nerrors += test_man_fill_direct_skip_2nd_indirect_skip_2nd_block_add_skipped(fapl, &cparam, &tparam);
+ nerrors += test_man_fill_direct_skip_indirect_two_rows_add_skipped(fapl, &cparam, &tparam);
+ nerrors += test_man_fill_direct_skip_indirect_two_rows_skip_indirect_row_add_skipped(fapl, &cparam, &tparam);
+ nerrors += test_man_fill_2nd_direct_skip_start_block_add_skipped(fapl, &cparam, &tparam);
+ nerrors += test_man_fill_2nd_direct_skip_2nd_indirect_start_block_add_skipped(fapl, &cparam, &tparam);
+ nerrors += test_man_fill_2nd_direct_fill_direct_skip_3rd_indirect_start_block_add_skipped(fapl, &cparam, &tparam);
+ nerrors += test_man_fill_2nd_direct_fill_direct_skip2_3rd_indirect_start_block_add_skipped(fapl, &cparam, &tparam);
+ nerrors += test_man_fill_3rd_direct_less_one_fill_direct_wrap_start_block_add_skipped(fapl, &cparam, &tparam);
+ nerrors += test_man_fill_1st_row_3rd_direct_fill_2nd_direct_less_one_wrap_start_block_add_skipped(fapl, &cparam, &tparam);
if (ExpressMode > 1)
printf("***Express test mode on. Some tests skipped\n");
else {
- nerrors += test_abs_fill_3rd_direct_fill_direct_skip_start_block_add_skipped(fapl, &cparam, &tparam);
- nerrors += test_abs_fill_3rd_direct_fill_2nd_direct_fill_direct_skip_3rd_indirect_start_block_add_skipped(fapl, &cparam, &tparam);
- nerrors += test_abs_fill_3rd_direct_fill_2nd_direct_fill_direct_skip_3rd_indirect_two_rows_start_block_add_skipped(fapl, &cparam, &tparam);
- nerrors += test_abs_fill_3rd_direct_fill_2nd_direct_fill_direct_skip_3rd_indirect_wrap_start_block_add_skipped(fapl, &cparam, &tparam);
- nerrors += test_abs_fill_4th_direct_less_one_fill_2nd_direct_fill_direct_skip_3rd_indirect_wrap_start_block_add_skipped(fapl, &cparam, &tparam);
+ nerrors += test_man_fill_3rd_direct_fill_direct_skip_start_block_add_skipped(fapl, &cparam, &tparam);
+ nerrors += test_man_fill_3rd_direct_fill_2nd_direct_fill_direct_skip_3rd_indirect_start_block_add_skipped(fapl, &cparam, &tparam);
+ nerrors += test_man_fill_3rd_direct_fill_2nd_direct_fill_direct_skip_3rd_indirect_two_rows_start_block_add_skipped(fapl, &cparam, &tparam);
+ nerrors += test_man_fill_3rd_direct_fill_2nd_direct_fill_direct_skip_3rd_indirect_wrap_start_block_add_skipped(fapl, &cparam, &tparam);
+ nerrors += test_man_fill_4th_direct_less_one_fill_2nd_direct_fill_direct_skip_3rd_indirect_wrap_start_block_add_skipped(fapl, &cparam, &tparam);
} /* end else */
#else /* QAK */
HDfprintf(stderr, "Uncomment tests!\n");
@@ -11458,10 +11610,10 @@ HDfprintf(stderr, "Uncomment tests!\n");
#ifndef QAK
/* Fragmented insertion patterns */
/* (covers insertion & deletion of fragmented blocks) */
- nerrors += test_abs_frag_simple(fapl, &cparam, &tparam);
- nerrors += test_abs_frag_direct(fapl, &cparam, &tparam);
- nerrors += test_abs_frag_2nd_direct(fapl, &cparam, &tparam);
- nerrors += test_abs_frag_3rd_direct(fapl, &cparam, &tparam);
+ nerrors += test_man_frag_simple(fapl, &cparam, &tparam);
+ nerrors += test_man_frag_direct(fapl, &cparam, &tparam);
+ nerrors += test_man_frag_2nd_direct(fapl, &cparam, &tparam);
+ nerrors += test_man_frag_3rd_direct(fapl, &cparam, &tparam);
#else /* QAK */
HDfprintf(stderr, "Uncomment tests!\n");
#endif /* QAK */
@@ -11489,16 +11641,28 @@ HDfprintf(stderr, "Uncomment tests!\n");
/* (reduce size of tests when re-opening each time) */
/* XXX: Try to speed things up enough that these tests don't have to be reduced */
tparam.del_dir = FHEAP_DEL_FORWARD;
- nerrors += test_abs_random_managed((curr_test == FHEAP_TEST_NORMAL ? (hsize_t)(100*1000*1000) : (hsize_t)(50*1000*1000)), fapl, &cparam, &tparam);
- nerrors += test_abs_random_pow2_managed((curr_test == FHEAP_TEST_NORMAL ? (hsize_t)(100*1000*1000) : (hsize_t)(4*1000*1000)), fapl, &cparam, &tparam);
+ nerrors += test_man_random((curr_test == FHEAP_TEST_NORMAL ? (hsize_t)(100*1000*1000) : (hsize_t)(50*1000*1000)), fapl, &cparam, &tparam);
+ nerrors += test_man_random_pow2((curr_test == FHEAP_TEST_NORMAL ? (hsize_t)(100*1000*1000) : (hsize_t)(4*1000*1000)), fapl, &cparam, &tparam);
tparam.del_dir = FHEAP_DEL_HEAP;
- nerrors += test_abs_random_managed((curr_test == FHEAP_TEST_NORMAL ? (hsize_t)(100*1000*1000) : (hsize_t)(50*1000*1000)), fapl, &cparam, &tparam);
- nerrors += test_abs_random_pow2_managed((curr_test == FHEAP_TEST_NORMAL ? (hsize_t)(100*1000*1000) : (hsize_t)(4*1000*1000)), fapl, &cparam, &tparam);
+ nerrors += test_man_random((curr_test == FHEAP_TEST_NORMAL ? (hsize_t)(100*1000*1000) : (hsize_t)(50*1000*1000)), fapl, &cparam, &tparam);
+ nerrors += test_man_random_pow2((curr_test == FHEAP_TEST_NORMAL ? (hsize_t)(100*1000*1000) : (hsize_t)(4*1000*1000)), fapl, &cparam, &tparam);
} /* end else */
#else /* QAK */
HDfprintf(stderr, "Uncomment tests!\n");
#endif /* QAK */
+#else /* QAK2 */
+HDfprintf(stderr, "Uncomment tests!\n");
+#endif /* QAK2 */
+
+ /*
+ * Test fractal heap huge object insertion
+ */
+ tparam.del_dir = FHEAP_DEL_FORWARD;
+ nerrors += test_huge_insert_one(fapl, &cparam, &tparam);
+
+ tparam.del_dir = FHEAP_DEL_HEAP;
+ nerrors += test_huge_insert_one(fapl, &cparam, &tparam);
#ifndef QAK
} /* end for */