Changeset 4498
- Timestamp:
- Jul 7, 2005, 5:40:33 AM (21 years ago)
- File:
-
- 1 edited
-
trunk/Ohana/src/libohana/src/ohana_allocate.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/libohana/src/ohana_allocate.c
r4300 r4498 156 156 } 157 157 158 ohana_memabort ("allocated memory not found for free (%s, %d)\n", file, line); 158 /* find already freed examples */ 159 for (i = 0; i < Nmemlist; i++) { 160 if (memlist[i].ptr == in) { 161 fprintf (stderr, "used here: %4d %s %d\n", i, memlist[i].file, memlist[i].line); 162 } 163 } 164 165 ohana_memabort ("allocated memory not found for free (%s, %d : %x)\n", file, line, in); 159 166 return; 160 167 } … … 234 241 Ns[N] ++; 235 242 if ((allmemory == 0) && (memlist[i].state == STATE_FREE)) continue; 236 fprintf (stderr, "%3d %4d %c %s %d\n", Ns[N], i, S[N], memlist[i].file, memlist[i].line); 243 if (memlist[i].state == STATE_EXTERNAL) { 244 fprintf (stderr, "%3d %4d %x : %x - external (external external) %c %s %d\n", 245 Ns[N], i, memlist[i].ptr, memlist[i].ptr, 246 S[N], memlist[i].file, memlist[i].line); 247 } else { 248 fprintf (stderr, "%3d %4d %x : %x - %x (%x %x) %c %s %d\n", 249 Ns[N], i, memlist[i].ptr, (memlist[i].ptr - 4), (memlist[i].ptr + memlist[i].size + 4), 250 *(long *)(memlist[i].ptr - 4), *(long *)(memlist[i].ptr + memlist[i].size), 251 S[N], memlist[i].file, memlist[i].line); 252 } 237 253 } 238 254 fprintf (stderr, "Nused: %d (Nalloc: %d, Nrealloc: %d), Nfree: %d\n",
Note:
See TracChangeset
for help on using the changeset viewer.
