Changeset 42043
- Timestamp:
- Feb 17, 2022, 11:48:54 AM (4 years ago)
- Location:
- branches/eam_branches/ipp-20211108/Ohana/src/libohana
- Files:
-
- 2 edited
-
include/ohana_allocate.h (modified) (1 diff)
-
src/ohana_allocate.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20211108/Ohana/src/libohana/include/ohana_allocate.h
r41341 r42043 47 47 void ohana_memdump_strings_file (FILE *f, int VERBOSE); 48 48 void ohana_memdump_set_maxlines (int N); 49 void ohana_memblock_show_stats (void *in); 49 50 50 51 # define ohana_memcheck(X) ohana_memcheck_func (__FILE__, __LINE__, __func__, X) -
branches/eam_branches/ipp-20211108/Ohana/src/libohana/src/ohana_allocate.c
r41560 r42043 754 754 NblockMaxDump = N; 755 755 } 756 757 void ohana_memblock_show_stats (void *in) { 758 759 OhanaMemblock *ref; 760 761 if (!in) { fprintf (stderr, "void pointer\n"); return; } 762 763 if (!lastBlock) { fprintf (stderr, "no memory allocated yet\n"); return; } 764 765 ref = (OhanaMemblock *) in - 1; 766 767 fprintf (stderr, "file: %s\n", ref->file); 768 fprintf (stderr, "line: %d\n", ref->line); 769 fprintf (stderr, "func: %s\n", ref->func); 770 771 fprintf (stderr, "size: %zd\n", ref->size); 772 773 fprintf (stderr, "start post: 0x%08x\n", ref->startblock); 774 fprintf (stderr, "end block: 0x%08x\n", ref->endblock); 775 776 // pointer to the start of the user memory 777 char *ptr = (char *)(in) + ref->size; 778 uint32_t endpost = *(uint32_t *) ptr; 779 780 fprintf (stderr, "end post: 0x%08x\n", endpost); 781 }
Note:
See TracChangeset
for help on using the changeset viewer.
