Lines Matching refs:ptrs
75 static struct memsz * ptrs=0; /* Array of pairs. */ variable
83 fprintf(fp," {%#lx,%ld},", (long)ptrs[i].p, (long)ptrs[i].sz); in dump_mem()
101 ptrs = realloc(ptrs, (size_t) arrsz * sizeof(struct memsz)); in testalloc()
102 ptrs[nptrs].p = 0; in testalloc()
103 ptrs[nptrs].sz = 0; in testalloc()
108 if (ptrs[i].p == 0) { in testalloc()
109 ptrs[i].p = p; in testalloc()
110 ptrs[i].sz = n; in testalloc()
125 if ( ptrs[i].p == p){ in testrealloc()
126 total_mem -= ptrs[i].sz; in testrealloc()
128 ptrs[i].p = realloc(p, n); in testrealloc()
129 ptrs[i].sz = n; in testrealloc()
132 (long)p,(long)n,(long)total_mem,(long)ptrs[i].p); in testrealloc()
134 return ptrs[i].p; in testrealloc()
148 if ( ptrs[i].p == p){ in testfree()
149 total_mem -= ptrs[i].sz; in testfree()
151 ptrs[i].p = 0; in testfree()
152 ptrs[i].sz = 0; in testfree()
171 ptrs = calloc(1, sizeof(struct memsz)); in main()
179 free(ptrs); in main()