commit bash-20160115 snapshot

This commit is contained in:
Chet Ramey
2016-01-20 10:41:39 -05:00
parent 725b284a48
commit 1b05a005ef
20 changed files with 127 additions and 82 deletions
+1 -1
View File
@@ -110,7 +110,7 @@ _print_malloc_stats (s, fp)
}
fprintf (fp, "\nTotal bytes in use: %lu, total bytes free: %lu\n",
totused, totfree);
fprintf (fp, "\nTotal bytes requested by application: %lu\n", _mstats.bytesreq);
fprintf (fp, "\nTotal bytes requested by application: %lu\n", (unsigned long)_mstats.bytesreq);
fprintf (fp, "Total mallocs: %d, total frees: %d, total reallocs: %d (%d copies)\n",
_mstats.nmal, _mstats.nfre, _mstats.nrealloc, _mstats.nrcopy);
fprintf (fp, "Total sbrks: %d, total bytes via sbrk: %d\n",
+1 -1
View File
@@ -290,7 +290,7 @@ _register_dump_table(fp)
{
entry = mem_table[i];
if (entry.mem)
fprintf (fp, "%s[%d] %p:%d:%s:%s:%s:%d:%d:%d\n",
fprintf (fp, "%s[%d] %p:%zu:%s:%s:%s:%d:%d:%d\n",
(i == table_bucket_index) ? "*" : "",
i,
entry.mem, entry.size,
+2 -2
View File
@@ -52,10 +52,10 @@ mtrace_alloc (tag, mem, size, file, line)
_mtrace_fp = stderr;
if (_mtrace_verbose)
fprintf (_mtrace_fp, "alloc: %s: %p (%d bytes) from '%s:%d'\n",
fprintf (_mtrace_fp, "alloc: %s: %p (%zu bytes) from '%s:%d'\n",
tag, mem, size, file ? file : "unknown", line);
else
fprintf (_mtrace_fp, "alloc:%p:%d:%s:%d\n",
fprintf (_mtrace_fp, "alloc:%p:%zu:%s:%d\n",
mem, size, file ? file : "unknown", line);
}