%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%% generic startup file (.ccmalloc) for %%%%%
%%%%    the ccmalloc memory profiler      %%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%% `%' and `#' are comments !

% This file must be called `.ccmalloc' and is searched for in the
% current directory and in the home directory of the user. If it
% does not exists then default values are used.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% The `file' command is used to specify the executable.
% If you do not specify this then ccmalloc tries to find an executable
% in the current directory that matches the running program. For this
% process it must call `nm' on each executable file in the directory
% which may be time consuming. With this option you can speed up this
% process. The default for the file name is `a.out'.

%file FILE

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% With the `log' command you can specify the name of a file where all
% output of libccmalloc is logged. The default is to use stderr. The
% argument to `log' is the name of the file you want to write to. It
% can also be `stdout' or `-' which sets stdout as logfile. If the
% logfile is stdout or stderr and is connected to a terminal then the
% output is slightly different.

%log -

########################################################################
#
# This is the `flag' section
#
#    `set FLAG' is the same as `set FLAG 1'
#
# The default values are those set below.
#
########################################################################

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% If only-count is set to one than only one additional pointer for
% each allocated data is used and also no call chain is generated.
% This is the fasted and most space efficient mode ccmalloc can operate
% in. In this mode you get at least the size of garbage produced.

%set only-count 0

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% If you enable keep-deallocated-data then all data deallocated with
% `free' (or `delete' in C++) is not given back to the free store
% but stays associated with the call chain of its allocation. This is
% very useful if your program does multiple deallocation of the
% same data.

%set keep-deallocated-data 0

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% A write boundary above allocated data can be used to detect
% overwrites.

%set check-overwrites

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% If you don't want to see the banner of ccmalloc then set
% `silent' to 1 (f.e. when logging to stderr)

%set silent

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% If your program was compiled with debugging information (-g) then
% ccmalloc can generate line number and file info for call chains opening
% a pipe to gdb. For very big programs this method is slow. In this case
% you can set `file-info' to zero and you will only get the function
% names. For SunOS 4.3.1 `nm' does not `demangle' C++ identifiers
% very well. So gdb is called instead but only if `file-info' is
% not set to 0. (Actually you can avoid the hanging bug under SunOS
% with disabling this flag).

%set file-info 1

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% If the free function of ccmalloc is called with an argument that does
% not make sense to ccmalloc or that has already been freed then you
% probably want the program to stop at this point. In that case you
% should set the `continue' flag to 0.

%set continue 1

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% You can restrict the length of call chains by setting `chain-length'
% to a number greater than zero. If `chain-length' is zero (the default)
% then chains are as long as possible.

%set chain-length 0

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% If you want to see the addresses of the allocated data (and
% deallocated data if keep-deallocated-data is set to 1) set
% `print-addresses' to 1

%set print-addresses 0

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% The default is to print function names and file/line number info
% on separate lines. With `print-on-one-line' set 1 all are printed
% on one line.

%set print-on-one-line 0

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% When printing call chains an empty line is printed between to
% call points. Set `additional-line' to 0 to disable this feature.

%set additional-line 1

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Calculate number of allocations and deallocations and bytes also on
% an per call chain basis. This uses 4 additional pointers for each
% call chain.

%set statistics 0

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% When printing the report to the log file the call chains are sorted by
% default with respect to the largest accumulated garbage produced by
% that call chain. This can be changed with setting `sort-by-wasted'
% to 0. In this case they are sorted by the number of allocated bytes.
% If you want instead the number of allocations as sorting criteria
% then set `sort-by-size' to 0.

%set sort-by-wasted 1
%set sort-by-size 1
