diff options
Diffstat (limited to 'src/H5HLdbg.c')
-rw-r--r-- | src/H5HLdbg.c | 26 |
1 files changed, 11 insertions, 15 deletions
diff --git a/src/H5HLdbg.c b/src/H5HLdbg.c index 6bf35ad..8107164 100644 --- a/src/H5HLdbg.c +++ b/src/H5HLdbg.c @@ -69,28 +69,25 @@ H5HL_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE * stream, int indent, int HDassert(indent >= 0); HDassert(fwidth >= 0); - if(NULL == (h = (H5HL_t *)H5AC_protect(f, dxpl_id, H5AC_LHEAP, addr, NULL, NULL, H5AC_READ))) + if(NULL == (h = (H5HL_t *)H5HL_protect(f, dxpl_id, addr, H5AC_READ))) HGOTO_ERROR(H5E_HEAP, H5E_CANTLOAD, FAIL, "unable to load heap") fprintf(stream, "%*sLocal Heap...\n", indent, ""); - fprintf(stream, "%*s%-*s %d\n", indent, "", fwidth, - "Dirty:", - (int) (h->cache_info.is_dirty)); fprintf(stream, "%*s%-*s %lu\n", indent, "", fwidth, "Header size (in bytes):", - (unsigned long) H5HL_SIZEOF_HDR(f)); + (unsigned long)h->prfx_size); HDfprintf(stream, "%*s%-*s %a\n", indent, "", fwidth, "Address of heap data:", - h->addr); + h->dblk_addr); HDfprintf(stream, "%*s%-*s %Zu\n", indent, "", fwidth, "Data bytes allocated for heap:", - h->heap_alloc); + h->dblk_size); /* * 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. */ - if(NULL == (marker = (uint8_t *)H5MM_calloc(h->heap_alloc))) + if(NULL == (marker = (uint8_t *)H5MM_calloc(h->dblk_size))) HGOTO_ERROR(H5E_HEAP, H5E_CANTALLOC, FAIL, "memory allocation failed") fprintf(stream, "%*sFree Blocks (offset, size):\n", indent, ""); @@ -102,7 +99,7 @@ H5HL_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE * stream, int indent, int HDfprintf(stream, "%*s%-*s %8Zu, %8Zu\n", indent+3, "", MAX(0,fwidth-9), temp_str, freelist->offset, freelist->size); - if(freelist->offset + freelist->size > h->heap_alloc) + if((freelist->offset + freelist->size) > h->dblk_size) fprintf(stream, "***THAT FREE BLOCK IS OUT OF BOUNDS!\n"); else { for(i = overlap = 0; i < (int)(freelist->size); i++) { @@ -111,25 +108,24 @@ H5HL_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE * stream, int indent, int marker[freelist->offset + i] = 1; } /* end for */ if(overlap) - fprintf(stream, "***THAT FREE BLOCK OVERLAPPED A PREVIOUS " - "ONE!\n"); + fprintf(stream, "***THAT FREE BLOCK OVERLAPPED A PREVIOUS ONE!\n"); else amount_free += freelist->size; } /* end for */ } /* end for */ - if(h->heap_alloc) + if(h->dblk_size) fprintf(stream, "%*s%-*s %.2f%%\n", indent, "", fwidth, "Percent of heap used:", - (100.0 * (double)(h->heap_alloc - amount_free) / (double)h->heap_alloc)); + (100.0 * (double)(h->dblk_size - amount_free) / (double)h->dblk_size)); /* * Print the data in a VMS-style octal dump. */ - H5_buffer_dump(stream, indent, h->chunk, marker, H5HL_SIZEOF_HDR(f), h->heap_alloc); + H5_buffer_dump(stream, indent, h->dblk_image, marker, (size_t)0, h->dblk_size); done: - if(h && H5AC_unprotect(f, dxpl_id, H5AC_LHEAP, addr, h, FALSE) < 0) + if(h && H5HL_unprotect(f, h) < 0) HDONE_ERROR(H5E_OHDR, H5E_PROTECT, FAIL, "unable to release object header") H5MM_xfree(marker); |