aboutsummaryrefslogtreecommitdiff
path: root/malloc/memusage.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2005-09-30 15:46:19 +0000
committerUlrich Drepper <drepper@redhat.com>2005-09-30 15:46:19 +0000
commitc0c9615cbb5d62df60ad3e9fe6bf38b50d4e83db (patch)
treeee1a2e67d226f1e95d465b0b19c60afeb318d365 /malloc/memusage.c
parentc293f2e542c129215d74effee75a5af7fef481d9 (diff)
downloadglibc-c0c9615cbb5d62df60ad3e9fe6bf38b50d4e83db.tar
glibc-c0c9615cbb5d62df60ad3e9fe6bf38b50d4e83db.tar.gz
glibc-c0c9615cbb5d62df60ad3e9fe6bf38b50d4e83db.tar.bz2
glibc-c0c9615cbb5d62df60ad3e9fe6bf38b50d4e83db.zip
* posix/regexec.c (update_cur_sifted_state, check_arrival,
check_arrival_add_next_nodes): Avoid using uninitialized variable. * malloc/memusage.c (dest): Fix a bunch of warnings on 32-bit arches. * sysdeps/i386/fpu/libm-test-ulps: Update for GCC 4.0.x.
Diffstat (limited to 'malloc/memusage.c')
-rw-r--r--malloc/memusage.c60
1 files changed, 39 insertions, 21 deletions
diff --git a/malloc/memusage.c b/malloc/memusage.c
index 49bcc6f289..f586ea61ba 100644
--- a/malloc/memusage.c
+++ b/malloc/memusage.c
@@ -793,14 +793,21 @@ dest (void)
\e[00;34m free|\e[0m %10lu %12llu\n",
(unsigned long long int) grand_total, (unsigned long int) peak_heap,
(unsigned long int) peak_stack,
- calls[idx_malloc], (unsigned long long int) total[idx_malloc],
- failed[idx_malloc] ? "\e[01;41m" : "", failed[idx_malloc],
- calls[idx_realloc], (unsigned long long int) total[idx_realloc],
- failed[idx_realloc] ? "\e[01;41m" : "", failed[idx_realloc],
- inplace, decreasing,
- calls[idx_calloc], (unsigned long long int) total[idx_calloc],
- failed[idx_calloc] ? "\e[01;41m" : "", failed[idx_calloc],
- calls[idx_free], (unsigned long long int) total[idx_free]);
+ (unsigned long int) calls[idx_malloc],
+ (unsigned long long int) total[idx_malloc],
+ failed[idx_malloc] ? "\e[01;41m" : "",
+ (unsigned long int) failed[idx_malloc],
+ (unsigned long int) calls[idx_realloc],
+ (unsigned long long int) total[idx_realloc],
+ failed[idx_realloc] ? "\e[01;41m" : "",
+ (unsigned long int) failed[idx_realloc],
+ (unsigned long int) inplace, (unsigned long int) decreasing,
+ (unsigned long int) calls[idx_calloc],
+ (unsigned long long int) total[idx_calloc],
+ failed[idx_calloc] ? "\e[01;41m" : "",
+ (unsigned long int) failed[idx_calloc],
+ (unsigned long int) calls[idx_free],
+ (unsigned long long int) total[idx_free]);
if (trace_mmap)
fprintf (stderr, "\
@@ -809,17 +816,28 @@ dest (void)
\e[00;34mmmap(a)|\e[0m %10lu %12llu %s%12lu\e[00;00m\n\
\e[00;34m mremap|\e[0m %10lu %12llu %s%12lu\e[00;00m (in place: %ld, dec: %ld)\n\
\e[00;34m munmap|\e[0m %10lu %12llu %s%12lu\e[00;00m\n",
- calls[idx_mmap_r], (unsigned long long int) total[idx_mmap_r],
- failed[idx_mmap_r] ? "\e[01;41m" : "", failed[idx_mmap_r],
- calls[idx_mmap_w], (unsigned long long int) total[idx_mmap_w],
- failed[idx_mmap_w] ? "\e[01;41m" : "", failed[idx_mmap_w],
- calls[idx_mmap_a], (unsigned long long int) total[idx_mmap_a],
- failed[idx_mmap_a] ? "\e[01;41m" : "", failed[idx_mmap_a],
- calls[idx_mremap], (unsigned long long int) total[idx_mremap],
- failed[idx_mremap] ? "\e[01;41m" : "", failed[idx_mremap],
- inplace_mremap, decreasing_mremap,
- calls[idx_munmap], (unsigned long long int) total[idx_munmap],
- failed[idx_munmap] ? "\e[01;41m" : "", failed[idx_munmap]);
+ (unsigned long int) calls[idx_mmap_r],
+ (unsigned long long int) total[idx_mmap_r],
+ failed[idx_mmap_r] ? "\e[01;41m" : "",
+ (unsigned long int) failed[idx_mmap_r],
+ (unsigned long int) calls[idx_mmap_w],
+ (unsigned long long int) total[idx_mmap_w],
+ failed[idx_mmap_w] ? "\e[01;41m" : "",
+ (unsigned long int) failed[idx_mmap_w],
+ (unsigned long int) calls[idx_mmap_a],
+ (unsigned long long int) total[idx_mmap_a],
+ failed[idx_mmap_a] ? "\e[01;41m" : "",
+ (unsigned long int) failed[idx_mmap_a],
+ (unsigned long int) calls[idx_mremap],
+ (unsigned long long int) total[idx_mremap],
+ failed[idx_mremap] ? "\e[01;41m" : "",
+ (unsigned long int) failed[idx_mremap],
+ (unsigned long int) inplace_mremap,
+ (unsigned long int) decreasing_mremap,
+ (unsigned long int) calls[idx_munmap],
+ (unsigned long long int) total[idx_munmap],
+ failed[idx_munmap] ? "\e[01;41m" : "",
+ (unsigned long int) failed[idx_munmap]);
/* Write out a histoogram of the sizes of the allocations. */
fprintf (stderr, "\e[01;32mHistogram for block sizes:\e[0;0m\n");
@@ -836,7 +854,7 @@ dest (void)
{
percent = (histogram[cnt / 16] * 100) / calls_total;
fprintf (stderr, "%5d-%-5d%12lu ", cnt, cnt + 15,
- histogram[cnt / 16]);
+ (unsigned long int) histogram[cnt / 16]);
if (percent == 0)
fputs (" <1% \e[41;37m", stderr);
else
@@ -853,7 +871,7 @@ dest (void)
if (large != 0)
{
percent = (large * 100) / calls_total;
- fprintf (stderr, " large %12lu ", large);
+ fprintf (stderr, " large %12lu ", (unsigned long int) large);
if (percent == 0)
fputs (" <1% \e[41;37m", stderr);
else