summaryrefslogtreecommitdiffstats
path: root/src/H5HL.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5HL.c')
-rw-r--r--src/H5HL.c29
1 files changed, 2 insertions, 27 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)))