Lines Matching refs:dmalloc

3 @setfilename dmalloc.info
10 * Dmalloc: (dmalloc). Malloc debug library.
53 The debug memory allocation or @dfn{dmalloc} library has been designed as a drop in replacement for…
63 Online documentation as well as the full source is available at URL @uref{http://dmalloc.com/}. De…
66 Please use the github issues URL @uref{https://github.com/j256/dmalloc/issues} if you have any prob…
135 @item Download the latest version of the library available from @uref{http://dmalloc.com/}.
155 Makefile to build the C++ version of dmalloc. You may want to use the @kbd{--enable-threads} optio…
156 threaded version of dmalloc. You may want to use the @kbd{--enable-shlib} option to build the shar…
157 dmalloc libraries. @kbd{sh ./configure --help} lists the available options to configure. Configur…
173 @item The @code{DMALLOC_SIZE} variable gets auto-configured in @file{dmalloc.h.2} but it may not ge…
177 @item Typing @kbd{make} should be enough to build @file{libdmalloc.a}, and @file{dmalloc} program. …
218 @file{dmalloc.h} include file in @file{/usr/local/include}, and the @file{dmalloc} utility in @file…
246 @item Download the latest version of the library from @uref{http://dmalloc.com/}.
263 support is available then the dmalloc library should be able to automatically shut itself down when…
272 @item To get the dmalloc utility to work you need to add an alias for dmalloc to your shell's runti…
273 file if supported. The idea is to have the shell capture the dmalloc program's output and adjust t…
277 @kbd{dmalloc runtime} and see any output with DMALLOC_OPTIONS in it then the alias did not take eff…
283 function dmalloc @{ eval `command dmalloc -b $*`; @}
289 function dmalloc @{ eval `\dmalloc -b $*`; @}
291 or use a full path to where the dmalloc binary is installed:
293 function dmalloc @{ eval `/usr/local/bin/dmalloc -b $*`; @}
303 alias dmalloc 'eval `\dmalloc -C \!*`'
312 fn dmalloc @{eval `@{/usr/local/bin/dmalloc $*@}@}
315 @item Although not necessary, you may want to include @file{dmalloc.h} in your C files and recompil…
324 #include "dmalloc.h"
329 @item Another optional task is to compile all of your source with the @file{dmalloc.h} with the
337 @item Link the dmalloc library into your program. The dmalloc library should probably be placed at…
340 @item Enable the debugging features by typing @kbd{dmalloc -l logfile -i 100 low} (for example). Y…
341 any messages printed by the dmalloc utility (see NOTE below). This will:
357 entering @kbd{dmalloc -m error-abort} (-m for minus) to remove the @code{error-abort} token and you…
362 @kbd{dmalloc --usage} will provide verbose usage info for the dmalloc program. @xref{Dmalloc Progr…
367 @emph{NOTE}: The output from the dmalloc utility should be captured by your shell. If you see a bu…
633 The dmalloc library replaces the heap library calls normally found in your system libraries with it…
634 you make a call to malloc (for example), you are calling dmalloc's version of the memory allocation…
635 allocate memory with these functions, the dmalloc library keeps track of a number of pieces of debu…
640 Whenever you reallocate or free a memory address, the dmalloc library always performs a number of c…
650 default this will cause the heap to be fully checked each and every time dmalloc is called whether …
651 realloc, or another dmalloc overloaded function.
654 can be accomplished in a couple different ways including the '-i' interval argument to the dmalloc
655 …am}. This will cause the check to be run every N-th time. For instance, 'dmalloc -i 3' will cause
662 …e program to start doing detailed heap checking after a certain point. For instance, with 'dmalloc
663 -s 1000' option, you can tell the dmalloc library to enable the heap checks after the 1000th memory…
664 dmalloc log file produced and use the iteration count if you have @code{LOG_ITERATION_COUNT} enable…
668 dmalloc will start checking the heap after it sees a dmalloc call from the @file{dmalloc_t.c} file,…
669 you use @samp{dmalloc_t.c:0}, with a 0 line number, then dmalloc will start checking the heap after…
703 @cindex dmalloc.h file
705 By including @file{dmalloc.h} in your C files, your calls to malloc, calloc, realloc, recalloc, mem…
739 @emph{WARNING}: If you are including the @file{dmalloc.h} file in your sources, it is recommended t…
740 of your include file list because dmalloc uses macros and may try to change declarations of the mal…
754 either you can't include @file{dmalloc.h} (such as library routines) or you just don't want to. Yo…
755 information about the routines that call dmalloc function from the return-address information. To …
761 dmalloc function. If you have unfreed memory that does not have associated file and line informati…
772 perl script in the @file{contrib/} directory with the dmalloc sources which seems to work well with…
785 dmalloc function is called. One solution this is to include @file{dmalloc.h} and compile your sour…
795 @emph{WARNING}: You should be sure to have @file{dmalloc.h} included at the end of your include fil…
796 dmalloc uses macros and may try to change declarations of the checked functions if they come after …
798 When this is defined dmalloc will override a number of functions and will insert a routine which kn…
800 @code{strcat}, and @code{strcasecmp}. For the full list see the end of @file{dmalloc.h}.
802 When you call @code{strlen}, for instance, dmalloc will make sure the string argument's fence-post …
803 overwritten, its file and line number locations are good, etc. With @code{bcopy}, dmalloc will mak…
806 …arguments checked, if the pointer is not in the heap then it is ignored since dmalloc does not know
825 token. You can disable this feature by entering @kbd{dmalloc -m error-abort} (-m for minus) to rem…
882 This variable stores the internal dmalloc library error number like errno does for the system calls…
895 This variable can be used to set the dmalloc log filename. The env variable @code{DMALLOC_LOGFILE}…
971 …s the current debug functionality value value. This allows you to save a copy of the debug dmalloc
995 * log to dmalloc.%p (pid)
997 dmalloc_debug_setup("debug=0x4f46d03,lockon=20,log=dmalloc.%p");
1035 To take a look at what information is provided, see the dmalloc_track_t function typedef in dmalloc
1119 This routine outputs the current dmalloc statistics to the log file.
1162 Write a message into the dmalloc logfile using vprintf-like arguments.
1174 Write a message into the dmalloc logfile using printf-like arguments.
1209 You can also display the string representation of an error value by a call to the @file{dmalloc} pr…
1223 (@samp{ERROR_SLOT_CORRUPT}). The @file{dmalloc} utility can give you the string version of the err…
1227 $ dmalloc -e 60
1228 dmalloc: dmalloc_errno value '60' =
1257 Invalid error number. If the library outputs this error then your dmalloc utility may be out of da…
1342 …ircumstances, sometimes seen with shared libraries, there can be two separate copies of the dmalloc
1367 A possibly invalid filename was discovered in the dmalloc administrative sections. This could indi…
1380 A line-number was out-of-bounds in the dmalloc administrative sections. This could indicate some c…
1483 @uref{http://dmalloc.com/} to report issues with this.
1535 is freed with the ``dmalloc-free'' byte (hex 0xdf, octal 0337, decimal 223). If the program writes…
1601 /* restore the dmalloc flag setting */
1605 …ed with the development and debugging sessions, you may want to disable the dmalloc library and put
1615 If you want to @emph{totally} disable the dmalloc library then you will need to recompile all the C…
1616 @file{dmalloc.h} while defining @code{DMALLOC_DISABLE}. This will cause the dmalloc macros to not …
1623 An alternative is to surround the @code{dmalloc.h} inclusion or any direct dmalloc references with …
1628 #include "dmalloc.h"
1643 // to get dmalloc information
1646 // without dmalloc information
1654 If you have disabled dmalloc with the @code{DMALLOC_DISABLED} flag or never included @file{dmalloc.…
1676 @code{x = new type}, there is no easy way for dmalloc to pass in file and line information unfortun…
1688 @cindex debugger usage with dmalloc
1689 @cindex using a debugger with dmalloc
1691 Here are a number of possible scenarios for using the dmalloc library to track down problems with y…
1693 …enable a logfile filename and turn on a set of debug features. You can use @kbd{dmalloc -l logfile
1695 the @code{print-messages} token by typing @kbd{dmalloc -p print-messages} afterwards. @xref{Dmallo…
1703 If you are using GDB, I would recommend adding the contents of @file{dmalloc.gdb} in the @file{cont…
1704 your @file{.gdbinit} file in your home directory. This enables the @code{dmalloc} command which wi…
1705 arguments to the dmalloc command and will set a break point in @code{dmalloc_error()} automatically.
1709 …ed libraries, you may want to execute the following commands initially to load in dmalloc and other
1741 internal error code. You can suspend your debugger and run @kbd{dmalloc -e value-returned-from-pri…
1784 not freed. This information comes from the calls from C files which included @file{dmalloc.h}. @x…
1815 So to find out who is allocating this particular 12 bytes the 3rd time, try @kbd{dmalloc -a 0x45008…
1865 …ded a @file{ra_info.pl} perl script in the @file{contrib/} directory with the dmalloc sources which
1902 To use dmalloc with your threaded program, you will first need to make sure that you are linking wi…
1903 …octh.a} which is the threaded version of the library. The support for threads in dmalloc should be
1906 malloc themselves. Since all of dmalloc's initialization happens when a call to malloc is made, we…
1916 option to the dmalloc program (for example @kbd{dmalloc -o 20}). @xref{Dmalloc Program}. Times va…
1918 core dumps and too high if the dmalloc library says its gone recursive although with low values, yo…
1927 So to use dmalloc with a threaded program, follow the following steps carefully.
1937 @item Link the dmalloc threaded library into your program. The dmalloc library should probably be …
1940 @item Enable the debugging options that you need by typing @kbd{dmalloc -l logfile -i 100 low} (for…
1941 @kbd{dmalloc --usage} will provide verbose usage info for the dmalloc program. @xref{Dmalloc Progr…
1943 @item Enable the ``lock-on'' option (for example @kbd{dmalloc -o 20}). As explained above, you may…
1946 @item If you get a dmalloc error #13 @samp{thread locking has not been configured} then you have no…
1947 program with the threaded version of dmalloc or there was a problem building it.
1949 …thing works, you should be able to run your program, have it not immediately crash, and the dmalloc
1978 As of right now, dmalloc is not detecting the @code{GetEnvironmentVariableA} function correctly so …
1983 code into the @code{main} function in your program to initialize the dmalloc flags yourself. Here …
1993 * on to dmalloc_debug_setup to setup the dmalloc debugging flags.
2003 The @code{#ifdef} is just a good idea. I means that when debugging with dmalloc you need to compil…
2015 @cindex cgi-bin usage of dmalloc
2023 @cindex usage of dmalloc in a daemon
2024 @cindex usage of dmalloc in a server
2025 @cindex usage of dmalloc with cgi-bin
2034 @item Build your server or cgi-bin program with the dmalloc library like any other program. @xref{…
2037 these programs often do not run from the command line, you cannot use the dmalloc utility program a…
2044 …MALLOC_OPTIONS} environmental variable. @xref{Environment Variable}. Use the dmalloc utility with
2048 > dmalloc -n -l logfile high
2055 …S} value into a call to @code{dmalloc_debug_setup}. Notice that I have surrounded the dmalloc code
2074 settings. You can use the dmalloc utility program to see what the numerical equivalent of the @kbd…
2077 > dmalloc -n high
2124 /* get the current dmalloc position */
2154 @code{dmalloc_vmessage} routines to annotate the dmalloc logfile with details to help you debug mem…
2171 1098918225: 3: flags = 0x4f4e503, logfile '/tmp/dmalloc.log'
2194 the dmalloc utility program. @xref{Dmalloc Program}. The 5th line of is the process-id that gener…
2204 question did not include @file{dmalloc.h} to get file/line-number information. The call to free wa…
2227 memory problem but both dmalloc and maybe valgrind don't show any problems. One of the big problem…
2231 This is especially true with threaded code which is often heavily affected when used with dmalloc a…
2236 problems are fence-post areas so start with dmalloc checking just the fence post and error logging …
2239 dmalloc -d 0 -l dmalloc.log -p log-stats -p log-non-free -p check-fence -p check-funcs
2250 @cindex dmalloc program
2251 @cindex dmalloc utility
2255 The dmalloc program is designed to assist in the setting of the environment variable @samp{DMALLOC_…
2257 the environment. Unfortunately, it cannot make the changes on its own so the output from dmalloc s…
2262 * Utility Usage:: How to use the dmalloc program.
2273 The dmalloc program is designed to assist in the setting of the environment variable @samp{DMALLOC_…
2275 the environment. Unfortunately, it cannot make the changes on its own so the output from dmalloc s…
2283 … aliasing or macro capabilities: csh, bash, ksh, tcsh, zsh, etc., setting up an alias to dmalloc to
2288 function dmalloc @{ eval `command dmalloc -b $*`; @}
2294 function dmalloc @{ eval `\dmalloc -b $*`; @}
2296 or use the full path to the dmalloc binary:
2298 function dmalloc @{ eval `/usr/local/bin/dmalloc -b $*`; @}
2308 alias dmalloc 'eval `\dmalloc -C \!*`'
2311 This allows the user to execute the dmalloc command as @samp{dmalloc arguments}.
2317 $ dmalloc -b arguments @dots{} > /tmp/out
2325 execute the above appropriate command on the command line. If you enter @kbd{dmalloc runtime} and …
2336 The most basic usage for the program is @samp{dmalloc [-bC] tag}. The @samp{-b} or @samp{-C} (eith…
2337 used at a time) are for generating Bourne or C shell type commands respectively. dmalloc will try …
2341 The @samp{tag} argument to dmalloc should match a line from the user's runtime configuration file o…
2342 …@xref{RC File}. If no tag is specified and no other option-commands used, dmalloc will display the
2345 To find out the usage for the debug malloc program try @samp{dmalloc --usage-long}. The standardiz…
2351 Here is a detailed list of the flags that can passed to dmalloc:
2378 Print the dmalloc error string that corresponds to the error number errno.
2397 provided here to override @kbd{-r} if it has been added to the dmalloc alias.
2445 dmalloc -l logfile.%p
2448 # dmalloc-box1.foo.com-1055213240
2449 dmalloc -l dmalloc-%h-%t
2452 dmalloc -l log.thread%i
2487 this can be put into the dmalloc alias.
2508 Set the @samp{start} part of the @samp{DMALLOC_OPTIONS} env variable to an dmalloc mark number. Th…
2543 If no arguments are specified, dmalloc dumps out the current settings that you have for the environ…
2554 With a -v option and no arguments, dmalloc dumps out the current settings in a verbose manner. For…
2565 Here are some examples of dmalloc usage:
2570 dmalloc high -i 100 -l logfile
2573 dmalloc -e 20
2577 dmalloc -a 0x34238:6
2581 dmalloc -l logfile.%t
2585 dmalloc -c runtime
2589 dmalloc low -p log-trans -l logfile
2592 dmalloc -V
2595 dmalloc -DV
2598 dmalloc -tv
2610 programs. The @samp{DMALLOC_OPTIONS} variable is used by the dmalloc library to enable or disable …
2612 It can be set either by hand or with the help of the dmalloc program. @xref{Dmalloc Program}.
2648 … don't have to worry about remembering all the hex values of the tokens because the dmalloc program
2673 @emph{WARNING}: it is easy to core dump any program with dmalloc, if you send in a format with argu…
2680 When this is set to a hex address (taken from the dmalloc log-file for instance) dmalloc will abort…
2690 @emph{NOTE}: dmalloc will also log all activity on this address along with a count.
2694 By setting this to a number X, dmalloc will only check the heap every X times. This means a number…
2702 Set this to a number X and dmalloc will begin checking the heap after X times. This means the inte…
2705 …has the format @samp{file:line}. For instance, if it is set to @samp{dmalloc_t.c:126} dmalloc will
2706 start checking the heap after it sees a dmalloc call from the @file{dmalloc_t.c} file, line number …
2707 @samp{dmalloc_t.c:0}, with a 0 line number, then dmalloc will start checking the heap after it sees…
2745 To get this information on the fly, use @kbd{dmalloc -DV}. This will print out the Debug tokens in…
2843 Write special ``dmalloc-free'' byte (hexadecimal @code{0xdf}, octal @code{0337}, decimal @code{223}…
2869 Write special ``dmalloc-alloc'' byte (hexadecimal @code{0xda}, octal @code{0332}, decimal @code{218…
2927 @emph{NOTE}: For beginning users, the dmalloc program has a couple of tags built into it so it is n…
2945 errors. You may want to use @kbd{-i} option to the dmalloc utility. @xref{Dmalloc Program}.
2951 functions. You may want to use @kbd{-i} option to the dmalloc utility. @xref{Dmalloc Program}.
2965 @samp{tag} is to be matched with the tag argument passed to the dmalloc program, while @samp{token1…
2996 For example, with the above file installed, you can type @code{dmalloc debug1} after setting up you…
3000 Enter @code{dmalloc none} to disable all memory debugging features.
3065 …locating of the caller's address from the dmalloc functions. This is useful in locating problems …
3066 functions called from C files which did not include @file{dmalloc.h}: C library calls for instance.
3106 available from the home page at URL @uref{http://dmalloc.com/}. Problems are often fixed and a new…
3124 check itself less frequently by using the @kbd{-i} option to the dmalloc utility. @xref{Dmalloc Pr…
3150 dmalloc library. The @kbd{ident} program should show chunk.c and other dmalloc files compiled into…
3153 dmalloc was not linked into your program.
3156 dmalloc log-file somewhere else in the filesystem. You will need to check both where the program w…
3166 @code{exit()} routine may not being called. You will have to resolve these issues so the dmalloc l…
3180 This will be necessary if you are @emph{not} including @file{dmalloc.h} in all of your C files or i…
3186 trying to use the dmalloc library at once. Please see the section of the manual about threads for …