diff options
author | Sergei Golubchik <sergii@pisem.net> | 2011-07-12 13:12:07 +0200 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2011-07-12 13:12:07 +0200 |
commit | 55d13e8dc72eb10d266762f413dabf4b5b887713 (patch) | |
tree | 2cb57f61860280c54e8dd924c5d4ef27e164e0dc /dbug/user.r | |
parent | 20056897002575c3e81b7ce08b171cadc906bebc (diff) | |
download | mariadb-git-55d13e8dc72eb10d266762f413dabf4b5b887713.tar.gz |
* build dbug manual and unit tests
* document safemalloc
Diffstat (limited to 'dbug/user.r')
-rw-r--r-- | dbug/user.r | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/dbug/user.r b/dbug/user.r index 8d8a9ce6910..1ccd46bd21e 100644 --- a/dbug/user.r +++ b/dbug/user.r @@ -881,6 +881,20 @@ Modifying .I initial value does not affect threads that are already running. Obviously, these macros are only useful in the multi-threaded environment. +.SP 1 +.LI DBUG_MALLOC\ +.LI DBUG_REALLOC\ +.LI DBUG_FREE\ +When these macros are used instead of system malloc(), realloc(), and free(), +.I dbug +built-in memory debugger performs checks for memory overwrites, underwrites, +memory leaks, and accesses to uninitialized or freed memory. Memory leaks are +found as memory not deallocated at shutdown. Memory overwrites and underwrites +are detected when this memory is about to be freed (by +.B DBUG_FREE +macro), unless +.B S +flag is present in the debug control string (see below). .LE .SK @@ -989,9 +1003,11 @@ Most useful with macros used to temporarily alter the debugger state. .LI S -When compiled with -.I safemalloc -this flag invokes "sanity" memory checks (for overwrites/underwrites) +Check the memory allocated with +.B DBUG_MALLOC +and +.B DBUG_REALLOC +for overwrites/underwrites on each .B DBUG_ENTER and |