diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2012-05-21 23:45:12 +0400 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2012-05-21 23:45:12 +0400 |
commit | 08d7e0c909744035300379edcc3e74d0184b3e30 (patch) | |
tree | f4fadbebdcef5f516cafde47e6e1bf3f9baf27a4 /winsup | |
parent | 428aba22a9de0fa185912dd1cafcc01d25821481 (diff) |
* strace.cc (strace::activate): Move printing heap size from here...
* heap.cc (heap_init_info): ...to here. Explain why. Print heap
size in hex and decimal.
Diffstat (limited to 'winsup')
-rw-r--r-- | winsup/cygwin/ChangeLog | 6 | ||||
-rw-r--r-- | winsup/cygwin/heap.cc | 11 | ||||
-rw-r--r-- | winsup/cygwin/strace.cc | 4 |
3 files changed, 16 insertions, 5 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 9e8d5d1af..1b79569f8 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,5 +1,11 @@ 2012-05-21 Corinna Vinschen <corinna@vinschen.de> + * strace.cc (strace::activate): Move printing heap size from here... + * heap.cc (heap_init_info): ...to here. Explain why. Print heap + size in hex and decimal. + +2012-05-21 Corinna Vinschen <corinna@vinschen.de> + * net.cc (cygwin_recvfrom): Don't shortcircuit if len == 0. Add comment to explain why. (cygwin_recv): Ditto. diff --git a/winsup/cygwin/heap.cc b/winsup/cygwin/heap.cc index d58a4cfcc..433628e06 100644 --- a/winsup/cygwin/heap.cc +++ b/winsup/cygwin/heap.cc @@ -192,8 +192,15 @@ heap_init () api_fatal ("MEM_COMMIT failed, %E"); } - debug_printf ("heap base %p, heap top %p", cygheap->user_heap.base, - cygheap->user_heap.top); + /* CV 2012-05-21: Moved printing heap size here from strace::activate. + The value printed in strace.activate was always wrong, because at the + time it's called, cygheap points to cygheap_dummy. Above all, the heap + size has not been evaluated yet, except in a forked child. Since + heap_init is called early, the heap size is printed pretty much at the + start of the strace output, so there isn't anything lost. */ + debug_printf ("heap base %p, heap top %p, heap size %p (%u)", + cygheap->user_heap.base, cygheap->user_heap.top, + cygheap->user_heap.chunk, cygheap->user_heap.chunk); page_const--; // malloc_init (); } diff --git a/winsup/cygwin/strace.cc b/winsup/cygwin/strace.cc index 49b4c5ab9..60e56fe5f 100644 --- a/winsup/cygwin/strace.cc +++ b/winsup/cygwin/strace.cc @@ -1,7 +1,7 @@ /* strace.cc: system/windows tracing Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, - 2006, 2007, 2008, 2009, 2010, 2011 Red Hat, Inc. + 2006, 2007, 2008, 2009, 2010, 2011, 2012 Red Hat, Inc. This file is part of Cygwin. @@ -59,8 +59,6 @@ strace::activate (bool isfork) prntf (1, NULL, "**********************************************"); prntf (1, NULL, "Program name: %W %s", progname, pidbuf); prntf (1, NULL, "OS version: Windows %s", wincap.osname ()); - if (cygheap && cygheap->user_heap.chunk) - prntf (1, NULL, "Heap size: %u", cygheap->user_heap.chunk); prntf (1, NULL, "**********************************************"); } } |