summaryrefslogtreecommitdiff
path: root/configs
diff options
context:
space:
mode:
authorRichard Mudgett <rmudgett@digium.com>2017-11-11 13:01:47 -0600
committerRichard Mudgett <rmudgett@digium.com>2017-11-11 13:45:22 -0600
commit507d9b5f9ed14ea5b6091aebdcc20dfd234726ab (patch)
tree378082d2949893f5640e72dab5533de39a09f212 /configs
parent1250b7c66401910f1b41f01b783725d9c99c7255 (diff)
core: Add cache_media_frames debugging option.
The media frame cache gets in the way of finding use after free errors of media frames. Tools like valgrind and MALLOC_DEBUG don't know when a frame is released because it gets put into the cache instead of being freed. * Added the "cache_media_frames" option to asterisk.conf. Disabling the option helps track down media frame mismanagement when using valgrind or MALLOC_DEBUG. The cache gets in the way of determining if the frame is used after free and who freed it. NOTE: This option has no effect when Asterisk is compiled with the LOW_MEMORY compile time option enabled because the cache code does not exist. To disable the media frame cache simply disable the cache_media_frames option in asterisk.conf and restart Asterisk. Sample asterisk.conf setting: [options] cache_media_frames=no ASTERISK-27413 Change-Id: I0ab2ce0f4547cccf2eb214901835c2d951b78c00
Diffstat (limited to 'configs')
-rw-r--r--configs/samples/asterisk.conf.sample9
1 files changed, 9 insertions, 0 deletions
diff --git a/configs/samples/asterisk.conf.sample b/configs/samples/asterisk.conf.sample
index 38cee2502..e57ee10e0 100644
--- a/configs/samples/asterisk.conf.sample
+++ b/configs/samples/asterisk.conf.sample
@@ -43,6 +43,15 @@ astsbindir => /usr/sbin
;minmemfree = 1 ; In MBs, Asterisk stops accepting new calls if
; the amount of free memory falls below this
; watermark.
+;cache_media_frames = yes ; Cache media frames for performance
+ ; Disable this option to help track down media frame
+ ; mismanagement when using valgrind or MALLOC_DEBUG.
+ ; The cache gets in the way of determining if the
+ ; frame is used after being freed and who freed it.
+ ; NOTE: This option has no effect when Asterisk is
+ ; compiled with the LOW_MEMORY compile time option
+ ; enabled because the cache code does not exist.
+ ; Default yes
;cache_record_files = yes ; Cache recorded sound files to another
; directory during recording.
;record_cache_dir = /tmp ; Specify cache directory (used in conjunction