Malloc: Save the caller's file name in the correct entry.
This commit is contained in:
parent
6992cfe973
commit
e08bedf9bf
|
@ -168,8 +168,8 @@ MMalloc(int size, char *file, int line)
|
||||||
malloced[i].size = size;
|
malloced[i].size = size;
|
||||||
malloced[i].line = line;
|
malloced[i].line = line;
|
||||||
malloced[i].address = result;
|
malloced[i].address = result;
|
||||||
bcopy(f, malloced[lastfree].file, min(strlen(f), MCFILENAMELEN - 1));
|
bcopy(f, malloced[i].file, min(strlen(f), MCFILENAMELEN - 1));
|
||||||
malloced[lastfree].file[MCFILENAMELEN - 1] = '\0';
|
malloced[i].file[MCFILENAMELEN - 1] = '\0';
|
||||||
}
|
}
|
||||||
if (malloccount > highwater)
|
if (malloccount > highwater)
|
||||||
highwater = malloccount;
|
highwater = malloccount;
|
||||||
|
|
Loading…
Reference in New Issue