summaryrefslogtreecommitdiffstats
path: root/src/H5HLdbg.c
diff options
context:
space:
mode:
authorLarry Knox <lrknox@hdfgroup.org>2020-11-12 12:27:05 (GMT)
committerGitHub <noreply@github.com>2020-11-12 12:27:05 (GMT)
commitaab84e704d10c15e8e759d75f809158c1923b6d5 (patch)
treeae2a45ea492075ce66be8d24f196817c57ab0790 /src/H5HLdbg.c
parent1ce4c8dd7ddaa344ad041514b1d3aa4979497275 (diff)
parent05a7b2523b47d34f921602d6968f2ad3053df873 (diff)
downloadhdf5-aab84e704d10c15e8e759d75f809158c1923b6d5.zip
hdf5-aab84e704d10c15e8e759d75f809158c1923b6d5.tar.gz
hdf5-aab84e704d10c15e8e759d75f809158c1923b6d5.tar.bz2
Merge pull request #38 from byrnHDF/hdf5_1_8
Reduce code differences between HDF5 1.8 and 1.10
Diffstat (limited to 'src/H5HLdbg.c')
-rw-r--r--src/H5HLdbg.c46
1 files changed, 17 insertions, 29 deletions
diff --git a/src/H5HLdbg.c b/src/H5HLdbg.c
index 9df2cb5..3410235 100644
--- a/src/H5HLdbg.c
+++ b/src/H5HLdbg.c
@@ -11,38 +11,28 @@
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-/* Programmer: Quincey Koziol <koziol@ncsa.uiuc.edu>
+/* Programmer: Quincey Koziol
* Wednesday, July 9, 2003
*
- * Purpose: Local Heap object debugging functions.
+ * Purpose: Local Heap object debugging functions.
*/
#define H5HL_PACKAGE /* Suppress error about including H5HLpkg */
-#include "H5private.h" /* Generic Functions */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5HLpkg.h" /* Local heaps */
-#include "H5Iprivate.h" /* ID Functions */
-#include "H5MMprivate.h" /* Memory management */
+#include "H5private.h" /* Generic Functions */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5HLpkg.h" /* Local heaps */
+#include "H5Iprivate.h" /* ID Functions */
+#include "H5MMprivate.h" /* Memory management */
/*-------------------------------------------------------------------------
- * Function: H5HL_debug
+ * Function: H5HL_debug
*
- * Purpose: Prints debugging information about a heap.
+ * Purpose: Prints debugging information about a heap.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: SUCCEED/FAIL
*
- * Programmer: Robb Matzke
- * matzke@llnl.gov
- * Aug 1 1997
- *
- * Modifications:
- * Robb Matzke, 1999-07-28
- * The ADDR argument is passed by value.
- *
- * John Mainzer, 6/17/05
- * Modified the function to use the new dirtied parameter of
- * of H5AC_unprotect() instead of modifying the is_dirty
- * field of the cache info.
+ * Programmer: Robb Matzke
+ * Aug 1 1997
*
*-------------------------------------------------------------------------
*/
@@ -74,10 +64,10 @@ H5HL_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int indent, int
HDfprintf(stream, "%*s%-*s %a\n", indent, "", fwidth, "Address of heap data:", h->dblk_addr);
HDfprintf(stream, "%*s%-*s %Zu\n", indent, "", fwidth, "Data bytes allocated for heap:", h->dblk_size);
- /*
- * Traverse the free list and check that all free blocks fall within
+ /* Traverse the free list and check that all free blocks fall within
* the heap and that no two free blocks point to the same region of
- * the heap. */
+ * the heap.
+ */
if (NULL == (marker = (uint8_t *)H5MM_calloc(h->dblk_size)))
HGOTO_ERROR(H5E_HEAP, H5E_CANTALLOC, FAIL, "memory allocation failed")
@@ -103,16 +93,14 @@ H5HL_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int indent, int
HDfprintf(stream, "***THAT FREE BLOCK OVERLAPPED A PREVIOUS ONE!\n");
else
amount_free += freelist->size;
- } /* end for */
+ } /* end else */
} /* end for */
if (h->dblk_size)
HDfprintf(stream, "%*s%-*s %.2f%%\n", indent, "", fwidth, "Percent of heap used:",
((double)100.0f * (double)(h->dblk_size - amount_free) / (double)h->dblk_size));
- /*
- * Print the data in a VMS-style octal dump.
- */
+ /* Print the data in a VMS-style octal dump */
H5_buffer_dump(stream, indent, h->dblk_image, marker, (size_t)0, h->dblk_size);
done: