* 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.
This commit is contained in:
Corinna Vinschen
2012-05-21 19:45:12 +00:00
parent 428aba22a9
commit 08d7e0c909
3 changed files with 16 additions and 5 deletions

View File

@@ -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 ();
}