summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDana Robinson <43805+derobins@users.noreply.github.com>2024-03-08 02:36:44 (GMT)
committerGitHub <noreply@github.com>2024-03-08 02:36:44 (GMT)
commitf24496074ffccde0c96bdfa1895610fb1b9835a0 (patch)
treef80a3eb76a37a5de97efeff778b79e92b65c5ec1 /src
parent871a49feca4725b83e2ce0b6ad4c8ae9551d9f06 (diff)
downloadhdf5-f24496074ffccde0c96bdfa1895610fb1b9835a0.zip
hdf5-f24496074ffccde0c96bdfa1895610fb1b9835a0.tar.gz
hdf5-f24496074ffccde0c96bdfa1895610fb1b9835a0.tar.bz2
Remove printf debugging in H5HL code (#4086)
Diffstat (limited to 'src')
-rw-r--r--src/H5HL.c29
-rw-r--r--src/H5HLprivate.h10
2 files changed, 3 insertions, 36 deletions
diff --git a/src/H5HL.c b/src/H5HL.c
index bdf46d6..680ef0a 100644
--- a/src/H5HL.c
+++ b/src/H5HL.c
@@ -648,15 +648,8 @@ H5HL_insert(H5F_t *f, H5HL_t *heap, size_t buf_size, const void *buf, size_t *of
assert(last_fl->offset == H5HL_ALIGN(last_fl->offset));
assert(last_fl->size == H5HL_ALIGN(last_fl->size));
- if (last_fl->size < H5HL_SIZEOF_FREE(f)) {
-#ifdef H5HL_DEBUG
- if (H5DEBUG(HL) && last_fl->size) {
- fprintf(H5DEBUG(HL), "H5HL: lost %lu bytes at line %d\n", (unsigned long)(last_fl->size),
- __LINE__);
- }
-#endif
+ if (last_fl->size < H5HL_SIZEOF_FREE(f))
last_fl = H5HL__remove_free(heap, last_fl);
- }
}
else {
/* Create a new free list element large enough that we can
@@ -675,21 +668,9 @@ H5HL_insert(H5F_t *f, H5HL_t *heap, size_t buf_size, const void *buf, size_t *of
if (heap->freelist)
heap->freelist->prev = fl;
heap->freelist = fl;
-#ifdef H5HL_DEBUG
- }
- else if (H5DEBUG(HL) && need_more > need_size) {
- fprintf(H5DEBUG(HL), "H5HL_insert: lost %lu bytes at line %d\n",
- (unsigned long)(need_more - need_size), __LINE__);
-#endif
}
}
-#ifdef H5HL_DEBUG
- if (H5DEBUG(HL)) {
- fprintf(H5DEBUG(HL), "H5HL: resize mem buf from %lu to %lu bytes\n",
- (unsigned long)(old_dblk_size), (unsigned long)(old_dblk_size + need_more));
- }
-#endif
if (NULL == (heap->dblk_image = H5FL_BLK_REALLOC(lheap_chunk, heap->dblk_image, heap->dblk_size)))
HGOTO_ERROR(H5E_HEAP, H5E_CANTALLOC, FAIL, "memory allocation failed");
@@ -822,14 +803,8 @@ H5HL_remove(H5F_t *f, H5HL_t *heap, size_t offset, size_t size)
* hold the free list data. If not, the freed chunk is forever
* lost.
*/
- if (size < H5HL_SIZEOF_FREE(f)) {
-#ifdef H5HL_DEBUG
- if (H5DEBUG(HL)) {
- fprintf(H5DEBUG(HL), "H5HL: lost %lu bytes\n", (unsigned long)size);
- }
-#endif
+ if (size < H5HL_SIZEOF_FREE(f))
HGOTO_DONE(SUCCEED);
- }
/* Add an entry to the free list */
if (NULL == (fl = H5FL_MALLOC(H5HL_free_t)))
diff --git a/src/H5HLprivate.h b/src/H5HLprivate.h
index 5d6959d..243d765 100644
--- a/src/H5HLprivate.h
+++ b/src/H5HLprivate.h
@@ -14,7 +14,7 @@
*
* Created: H5HLprivate.h
*
- * Purpose: Private declarations for the H5HL (local heap) package.
+ * Purpose: Private declarations for the H5HL (local heap) package
*
*-------------------------------------------------------------------------
*/
@@ -26,14 +26,6 @@
#include "H5ACprivate.h" /* Metadata cache */
#include "H5Fprivate.h" /* File access */
-/*
- * Feature: Define H5HL_DEBUG on the compiler command line if you want to
- * enable diagnostic messages from this layer.
- */
-#ifdef NDEBUG
-#undef H5HL_DEBUG
-#endif
-
#define H5HL_ALIGN(X) ((((unsigned)X) + 7) & (unsigned)(~0x07)) /* align on 8-byte boundary */
#define H5HL_SIZEOF_FREE(F) \