It is desirable to inline as many hot routines as possible to reduce the run-time overhead of CPU intensive applications. In general, it appears that compilers go by their own rules when to inline a routine, and when to not inline it. This blog post is intended to introduce some of the not widely known (or used) compiler internal flags, to tweak the pre-defined rules of compiler. Consider the following trivial C code:% cat inline.c#include <stdio.h>#include <stdlib.h>inline void freememory(int *ptr){ free(ptr);}extern inline...
Monday, 14 November 2005
Sunday, 6 November 2005
Sun Studio: Gathering memory allocations/leaks data, from a running process
Posted on 20:11 by Unknown
One simple way of collecting this information is with the runtime checking (RTC) feature of dbx, as described in Investigating memory leaks with dbx. Yet another way is to use the collector to get this data, if the process is already running under dbx.Note that running the application under collect tool, with heap tracing on {with -H on option}, produces overwhelming data which includes all the leaks that occured in the life span of the process. So, if we need to collect the data only for a specific component of the application, clearly running...
Subscribe to:
Posts (Atom)