summaryrefslogtreecommitdiff
path: root/main/asterisk.c
diff options
context:
space:
mode:
authorAutomerge script <automerge@asterisk.org>2012-11-29 01:20:42 +0000
committerAutomerge script <automerge@asterisk.org>2012-11-29 01:20:42 +0000
commit9b9da2938be01eeb62914a191d6125b594aea608 (patch)
tree7e54065833b02de7c08b5072e67ac6230e2e9b9b /main/asterisk.c
parent1e1f6c78671b899fe83b82309c237044e92cd627 (diff)
Merged revisions 376791 via svnmerge from
file:///srv/subversion/repos/asterisk/trunk ................ r376791 | rmudgett | 2012-11-28 18:48:12 -0600 (Wed, 28 Nov 2012) | 32 lines Add MALLOC_DEBUG atexit unreleased malloc memory summary. * Adds the following CLI commands to control MALLOC_DEBUG reporting of unreleased malloc memory when Asterisk is shut down. memory atexit list on memory atexit list off memory atexit summary byline memory atexit summary byfunc memory atexit summary byfile memory atexit summary off * Made check all remaining allocated region blocks atexit for fence violations. * Increased the allocated region hash table size by about three times. It still isn't large enough considering the number of malloced blocks Asterisk uses. * Made CLI "memory show allocations anomalies" use regions_check_all_fences(). Review: https://reviewboard.asterisk.org/r/2196/ ........ Merged revisions 376788 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 376789 from http://svn.asterisk.org/svn/asterisk/branches/10 ........ Merged revisions 376790 from http://svn.asterisk.org/svn/asterisk/branches/11 ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@376798 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main/asterisk.c')
-rw-r--r--main/asterisk.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/main/asterisk.c b/main/asterisk.c
index 637bf1277..6085e9589 100644
--- a/main/asterisk.c
+++ b/main/asterisk.c
@@ -3965,6 +3965,10 @@ int main(int argc, char *argv[])
* an Asterisk instance, and that there isn't one already running. */
multi_thread_safe = 1;
+#if defined(__AST_DEBUG_MALLOC)
+ __ast_mm_init_phase_1();
+#endif /* defined(__AST_DEBUG_MALLOC) */
+
/* Spawning of astcanary must happen AFTER the call to daemon(3) */
if (isroot && ast_opt_high_priority) {
snprintf(canary_filename, sizeof(canary_filename), "%s/alt.asterisk.canary.tweet.tweet.tweet", ast_config_AST_RUN_DIR);
@@ -4034,10 +4038,6 @@ int main(int argc, char *argv[])
ast_el_read_history(filename);
}
-#if defined(__AST_DEBUG_MALLOC)
- __ast_mm_init_phase_1();
-#endif /* defined(__AST_DEBUG_MALLOC) */
-
ast_ulaw_init();
ast_alaw_init();
tdd_init();
@@ -4271,9 +4271,9 @@ int main(int argc, char *argv[])
pthread_sigmask(SIG_UNBLOCK, &sigs, NULL);
-#ifdef __AST_DEBUG_MALLOC
+#if defined(__AST_DEBUG_MALLOC)
__ast_mm_init_phase_2();
-#endif
+#endif /* defined(__AST_DEBUG_MALLOC) */
ast_lastreloadtime = ast_startuptime = ast_tvnow();
ast_cli_register_multiple(cli_asterisk, ARRAY_LEN(cli_asterisk));