diff options
author | wm4 <wm4@nowhere> | 2012-08-19 17:50:37 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2012-08-20 15:36:05 +0200 |
commit | 41d6ddf5fbd287ad5d5a7ba44a2dfb82db4461fd (patch) | |
tree | 7a327738e3a580718eee956c6592d90ab9042cec /subopt-helper.c | |
parent | 6386b11324cb2c0cb150123038192e3b3859f229 (diff) | |
download | mpv-41d6ddf5fbd287ad5d5a7ba44a2dfb82db4461fd.tar.bz2 mpv-41d6ddf5fbd287ad5d5a7ba44a2dfb82db4461fd.tar.xz |
mplayer: enable talloc leak report if special environment is variable set
The functionality enabled with the --leak-report option is very useful
for debugging. Introduce a check for the MPLAYER_LEAK_REPORT environment
variable, and enable talloc leak report if it's set to "1".
The environment variable encourages enabling leak report permanently
during development. It's also a bit harder to get wrong: if the
--leak-report option is not the first option, it's silently ignored.
You can't put this option into a config file either. Enabling this
with --enable-debug in configure is not an option, because the leak
report code doesn't seem to be thread-safe, and thus is a bit dangerous.
Also, move the code to the very beginning to make sure leak report is
enabled before any other talloc function is used. Otherwise, these
allocations could be missed.
Diffstat (limited to 'subopt-helper.c')
0 files changed, 0 insertions, 0 deletions