mirror of git://sourceware.org/git/glibc.git
* malloc/memusagestat.c: Silence warnings.
This commit is contained in:
parent
1d05c2fb9c
commit
0c1c6c6c08
|
|
@ -1,5 +1,7 @@
|
||||||
2006-08-09 Ulrich Drepper <drepper@redhat.com>
|
2006-08-09 Ulrich Drepper <drepper@redhat.com>
|
||||||
|
|
||||||
|
* malloc/memusagestat.c: Silence warnings.
|
||||||
|
|
||||||
* malloc/malloc.c: Dynamically size mmap treshold if the program
|
* malloc/malloc.c: Dynamically size mmap treshold if the program
|
||||||
frees mmaped blocks.
|
frees mmaped blocks.
|
||||||
Patch by Valerie Henson and Arjan van de Ven.
|
Patch by Valerie Henson and Arjan van de Ven.
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/* Generate graphic from memory profiling data.
|
/* Generate graphic from memory profiling data.
|
||||||
Copyright (C) 1998, 1999, 2000, 2005 Free Software Foundation, Inc.
|
Copyright (C) 1998, 1999, 2000, 2005, 2006 Free Software Foundation, Inc.
|
||||||
This file is part of the GNU C Library.
|
This file is part of the GNU C Library.
|
||||||
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
|
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
|
||||||
|
|
||||||
|
|
@ -277,16 +277,16 @@ main (int argc, char *argv[])
|
||||||
|
|
||||||
gdImageString (im_out, gdFontSmall, 38, ysize - 14, (unsigned char *) "0",
|
gdImageString (im_out, gdFontSmall, 38, ysize - 14, (unsigned char *) "0",
|
||||||
blue);
|
blue);
|
||||||
snprintf(buf, sizeof (buf), heap_format, 0);
|
snprintf (buf, sizeof (buf), heap_format, 0);
|
||||||
gdImageString (im_out, gdFontSmall, maxsize_heap < 1024 ? 32 : 26,
|
gdImageString (im_out, gdFontSmall, maxsize_heap < 1024 ? 32 : 26,
|
||||||
ysize - 26, buf, red);
|
ysize - 26, (unsigned char *) buf, red);
|
||||||
snprintf(buf, sizeof (buf), stack_format, 0);
|
snprintf (buf, sizeof (buf), stack_format, 0);
|
||||||
gdImageString (im_out, gdFontSmall, xsize - 37, ysize - 26,
|
gdImageString (im_out, gdFontSmall, xsize - 37, ysize - 26,
|
||||||
buf, green);
|
(unsigned char *) buf, green);
|
||||||
|
|
||||||
if (string != NULL)
|
if (string != NULL)
|
||||||
gdImageString (im_out, gdFontLarge, (xsize - strlen (string) * 8) / 2,
|
gdImageString (im_out, gdFontLarge, (xsize - strlen (string) * 8) / 2,
|
||||||
2, (char *) string, green);
|
2, (unsigned char *) string, green);
|
||||||
|
|
||||||
gdImageStringUp (im_out, gdFontSmall, 1, ysize / 2 - 10,
|
gdImageStringUp (im_out, gdFontSmall, 1, ysize / 2 - 10,
|
||||||
(unsigned char *) "allocated", red);
|
(unsigned char *) "allocated", red);
|
||||||
|
|
@ -299,9 +299,11 @@ main (int argc, char *argv[])
|
||||||
(unsigned char *) "stack", green);
|
(unsigned char *) "stack", green);
|
||||||
|
|
||||||
snprintf (buf, sizeof (buf), heap_format, maxsize_heap / heap_scale);
|
snprintf (buf, sizeof (buf), heap_format, maxsize_heap / heap_scale);
|
||||||
gdImageString (im_out, gdFontSmall, 39 - strlen (buf) * 6, 14, buf, red);
|
gdImageString (im_out, gdFontSmall, 39 - strlen (buf) * 6, 14,
|
||||||
|
(unsigned char *) buf, red);
|
||||||
snprintf (buf, sizeof (buf), stack_format, maxsize_stack / stack_scale);
|
snprintf (buf, sizeof (buf), stack_format, maxsize_stack / stack_scale);
|
||||||
gdImageString (im_out, gdFontSmall, xsize - 37, 14, buf, green);
|
gdImageString (im_out, gdFontSmall, xsize - 37, 14,
|
||||||
|
(unsigned char *) buf, green);
|
||||||
|
|
||||||
for (line = 1; line <= 3; ++line)
|
for (line = 1; line <= 3; ++line)
|
||||||
{
|
{
|
||||||
|
|
@ -312,7 +314,7 @@ main (int argc, char *argv[])
|
||||||
snprintf (buf, sizeof (buf), heap_format, maxsize_heap / 4 * line /
|
snprintf (buf, sizeof (buf), heap_format, maxsize_heap / 4 * line /
|
||||||
heap_scale);
|
heap_scale);
|
||||||
gdImageString (im_out, gdFontSmall, 39 - strlen (buf) * 6,
|
gdImageString (im_out, gdFontSmall, 39 - strlen (buf) * 6,
|
||||||
ysize - 26 - cnt, buf, red);
|
ysize - 26 - cnt, (unsigned char *) buf, red);
|
||||||
|
|
||||||
cnt2 = ((ysize - 40) * (maxsize_stack / 4 * line / stack_scale)) /
|
cnt2 = ((ysize - 40) * (maxsize_stack / 4 * line / stack_scale)) /
|
||||||
(maxsize_stack / stack_scale);
|
(maxsize_stack / stack_scale);
|
||||||
|
|
@ -322,11 +324,12 @@ main (int argc, char *argv[])
|
||||||
snprintf (buf, sizeof (buf), stack_format, maxsize_stack / 4 * line /
|
snprintf (buf, sizeof (buf), stack_format, maxsize_stack / 4 * line /
|
||||||
stack_scale);
|
stack_scale);
|
||||||
gdImageString (im_out, gdFontSmall, xsize - 37, ysize - 26 - cnt2,
|
gdImageString (im_out, gdFontSmall, xsize - 37, ysize - 26 - cnt2,
|
||||||
buf, green);
|
(unsigned char *) buf, green);
|
||||||
}
|
}
|
||||||
|
|
||||||
snprintf (buf, sizeof (buf), "%llu", (unsigned long long) total);
|
snprintf (buf, sizeof (buf), "%llu", (unsigned long long) total);
|
||||||
gdImageString (im_out, gdFontSmall, xsize - 50, ysize - 14, buf, blue);
|
gdImageString (im_out, gdFontSmall, xsize - 50, ysize - 14,
|
||||||
|
(unsigned char *) buf, blue);
|
||||||
|
|
||||||
if (!time_based)
|
if (!time_based)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue