aboutsummaryrefslogtreecommitdiffstats
path: root/astmm.c
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2006-03-19 01:39:14 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2006-03-19 01:39:14 +0000
commitd328c2ea16345797f774231ab1a9c187af850a5e (patch)
treea9ad01ca57546de53f45ae621678001de1350927 /astmm.c
parent90c2670eb0d939aab851f4a56a062e57ef244719 (diff)
When astmm is in use, define ast_malloc and friends to malloc, etc., so that
it doesn't report that all allocations are coming from utils.h. Also, add some more information to the error message astmm reports when a memory allocation failure occurs. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@13513 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'astmm.c')
-rw-r--r--astmm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/astmm.c b/astmm.c
index 122504a58..c3b26a356 100644
--- a/astmm.c
+++ b/astmm.c
@@ -108,9 +108,9 @@ static inline void *__ast_alloc_region(size_t size, const enum func_type which,
}
ast_mutex_unlock(&reglock);
if (!reg) {
- fprintf(stderr, "Memory allocation failure\n");
+ fprintf(stderr, "Memory Allocation Failure - '%d' bytes in function %s at line %d of %s\n", (int) size, func, lineno, file);
if (mmlog) {
- fprintf(mmlog, "%ld - Memory allocation failure\n", time(NULL));
+ fprintf(stderr, "%ld - Memory Allocation Failure - '%d' bytes in function %s at line %d of %s\n", time(NULL), (int) size, func, lineno, file);
fflush(mmlog);
}
}