Lines Matching refs:fp
622 xmlMemContentShow(FILE *fp, MEMHDR *p) in xmlMemContentShow() argument
628 fprintf(fp, " NULL"); in xmlMemContentShow()
654 fprintf(fp, " pointer to #%lu at index %d", in xmlMemContentShow()
661 fprintf(fp," null"); in xmlMemContentShow()
663 if (buf[i] == 0) fprintf(fp," \"%.25s\"", buf); in xmlMemContentShow()
665 fprintf(fp," ["); in xmlMemContentShow()
667 fprintf(fp,"%c", buf[j]); in xmlMemContentShow()
668 fprintf(fp,"]"); in xmlMemContentShow()
685 xmlMemDisplayLast(FILE *fp, long nbBytes) in xmlMemDisplayLast() argument
692 FILE *old_fp = fp; in xmlMemDisplayLast()
697 if (fp == NULL) { in xmlMemDisplayLast()
698 fp = fopen(".memorylist", "w"); in xmlMemDisplayLast()
699 if (fp == NULL) in xmlMemDisplayLast()
704 fprintf(fp," Last %li MEMORY ALLOCATED : %lu, MAX was %lu\n", in xmlMemDisplayLast()
706 fprintf(fp,"BLOCK NUMBER SIZE TYPE\n"); in xmlMemDisplayLast()
711 fprintf(fp,"%-5u %6lu %6lu ",idx++,p->mh_number, in xmlMemDisplayLast()
714 case STRDUP_TYPE:fprintf(fp,"strdup() in ");break; in xmlMemDisplayLast()
715 case MALLOC_TYPE:fprintf(fp,"malloc() in ");break; in xmlMemDisplayLast()
716 case REALLOC_TYPE:fprintf(fp,"realloc() in ");break; in xmlMemDisplayLast()
717 case MALLOC_ATOMIC_TYPE:fprintf(fp,"atomicmalloc() in ");break; in xmlMemDisplayLast()
718 case REALLOC_ATOMIC_TYPE:fprintf(fp,"atomicrealloc() in ");break; in xmlMemDisplayLast()
720 fprintf(fp,"Unknown memory block, may be corrupted"); in xmlMemDisplayLast()
723 fclose(fp); in xmlMemDisplayLast()
726 if (p->mh_file != NULL) fprintf(fp,"%s(%u)", p->mh_file, p->mh_line); in xmlMemDisplayLast()
728 fprintf(fp," INVALID"); in xmlMemDisplayLast()
731 xmlMemContentShow(fp, p); in xmlMemDisplayLast()
733 fprintf(fp," skip"); in xmlMemDisplayLast()
735 fprintf(fp,"\n"); in xmlMemDisplayLast()
741 fprintf(fp,"Memory list not compiled (MEM_LIST not defined !)\n"); in xmlMemDisplayLast()
744 fclose(fp); in xmlMemDisplayLast()
756 xmlMemDisplay(FILE *fp) in xmlMemDisplay() argument
768 FILE *old_fp = fp; in xmlMemDisplay()
770 if (fp == NULL) { in xmlMemDisplay()
771 fp = fopen(".memorylist", "w"); in xmlMemDisplay()
772 if (fp == NULL) in xmlMemDisplay()
781 fprintf(fp," %s\n\n", buf); in xmlMemDisplay()
785 fprintf(fp," MEMORY ALLOCATED : %lu, MAX was %lu\n", in xmlMemDisplay()
787 fprintf(fp,"BLOCK NUMBER SIZE TYPE\n"); in xmlMemDisplay()
792 fprintf(fp,"%-5u %6lu %6lu ",idx++,p->mh_number, in xmlMemDisplay()
795 case STRDUP_TYPE:fprintf(fp,"strdup() in ");break; in xmlMemDisplay()
796 case MALLOC_TYPE:fprintf(fp,"malloc() in ");break; in xmlMemDisplay()
797 case REALLOC_TYPE:fprintf(fp,"realloc() in ");break; in xmlMemDisplay()
798 case MALLOC_ATOMIC_TYPE:fprintf(fp,"atomicmalloc() in ");break; in xmlMemDisplay()
799 case REALLOC_ATOMIC_TYPE:fprintf(fp,"atomicrealloc() in ");break; in xmlMemDisplay()
801 fprintf(fp,"Unknown memory block, may be corrupted"); in xmlMemDisplay()
804 fclose(fp); in xmlMemDisplay()
807 if (p->mh_file != NULL) fprintf(fp,"%s(%u)", p->mh_file, p->mh_line); in xmlMemDisplay()
809 fprintf(fp," INVALID"); in xmlMemDisplay()
812 xmlMemContentShow(fp, p); in xmlMemDisplay()
814 fprintf(fp," skip"); in xmlMemDisplay()
816 fprintf(fp,"\n"); in xmlMemDisplay()
821 fprintf(fp,"Memory list not compiled (MEM_LIST not defined !)\n"); in xmlMemDisplay()
824 fclose(fp); in xmlMemDisplay()
886 xmlMemShow(FILE *fp, int nr ATTRIBUTE_UNUSED) in xmlMemShow() argument
892 if (fp != NULL) in xmlMemShow()
893 fprintf(fp," MEMORY ALLOCATED : %lu, MAX was %lu\n", in xmlMemShow()
898 fprintf(fp,"NUMBER SIZE TYPE WHERE\n"); in xmlMemShow()
901 fprintf(fp,"%6lu %6lu ",p->mh_number,(unsigned long)p->mh_size); in xmlMemShow()
903 case STRDUP_TYPE:fprintf(fp,"strdup() in ");break; in xmlMemShow()
904 case MALLOC_TYPE:fprintf(fp,"malloc() in ");break; in xmlMemShow()
905 case MALLOC_ATOMIC_TYPE:fprintf(fp,"atomicmalloc() in ");break; in xmlMemShow()
906 case REALLOC_TYPE:fprintf(fp,"realloc() in ");break; in xmlMemShow()
907 case REALLOC_ATOMIC_TYPE:fprintf(fp,"atomicrealloc() in ");break; in xmlMemShow()
908 default:fprintf(fp," ??? in ");break; in xmlMemShow()
911 fprintf(fp,"%s(%u)", p->mh_file, p->mh_line); in xmlMemShow()
913 fprintf(fp," INVALID"); in xmlMemShow()
914 xmlMemContentShow(fp, p); in xmlMemShow()
915 fprintf(fp,"\n"); in xmlMemShow()