[asterisk-commits] russell: trunk r87392 - in /trunk: ./ main/astmm.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Mon Oct 29 14:47:53 CDT 2007
Author: russell
Date: Mon Oct 29 14:47:52 2007
New Revision: 87392
URL: http://svn.digium.com/view/asterisk?view=rev&rev=87392
Log:
Merged revisions 87373 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r87373 | russell | 2007-10-29 14:21:06 -0500 (Mon, 29 Oct 2007) | 5 lines
Remove a lock that doesn't make any sense. The regions lock needs to be held
when traversing the list of allocated chunks so that they can be printed out
to the CLI.
(Thanks to eliel on #asterisk-dev for pointing this out!)
........
Modified:
trunk/ (props changed)
trunk/main/astmm.c
Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.
Modified: trunk/main/astmm.c
URL: http://svn.digium.com/view/asterisk/trunk/main/astmm.c?view=diff&rev=87392&r1=87391&r2=87392
==============================================================================
--- trunk/main/astmm.c (original)
+++ trunk/main/astmm.c Mon Oct 29 14:47:52 2007
@@ -84,7 +84,6 @@
/*! Tracking this mutex will cause infinite recursion, as the mutex tracking
* code allocates memory */
AST_MUTEX_DEFINE_STATIC_NOTRACKING(reglock);
-AST_MUTEX_DEFINE_STATIC(showmemorylock);
#define astmm_log(...) \
do { \
@@ -333,7 +332,7 @@
if (a->argc > 3)
fn = a->argv[3];
- ast_mutex_lock(&showmemorylock);
+ ast_mutex_lock(®lock);
for (x = 0; x < SOME_PRIME; x++) {
for (reg = regions[x]; reg; reg = reg->next) {
if (!fn || !strcasecmp(fn, reg->file) || !strcasecmp(fn, "anomolies")) {
@@ -359,7 +358,7 @@
}
}
}
- ast_mutex_unlock(&showmemorylock);
+ ast_mutex_unlock(®lock);
if (cache_len)
ast_cli(a->fd, "%d bytes allocated (%d in caches) in %d allocations\n", len, cache_len, count);
More information about the asterisk-commits
mailing list