/*! 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 { \
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")) {
}
}
}
- 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);