mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-09 03:18:30 +00:00
allow 'show memory' and 'show memory summary' to distinguish memory allocations that were done for caching purposes, so they don't look like memory leaks
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@48987 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -297,7 +297,7 @@ static struct ast_frame *ast_frame_header_new(void)
|
||||
}
|
||||
}
|
||||
|
||||
if (!(f = ast_calloc(1, sizeof(*f))))
|
||||
if (!(f = ast_calloc_cache(1, sizeof(*f))))
|
||||
return NULL;
|
||||
|
||||
f->mallocd_hdr_len = sizeof(*f);
|
||||
@@ -454,7 +454,7 @@ struct ast_frame *ast_frdup(const struct ast_frame *f)
|
||||
AST_LIST_TRAVERSE_SAFE_END
|
||||
}
|
||||
if (!buf) {
|
||||
if (!(buf = ast_calloc(1, len)))
|
||||
if (!(buf = ast_calloc_cache(1, len)))
|
||||
return NULL;
|
||||
out = buf;
|
||||
out->mallocd_hdr_len = len;
|
||||
|
||||
Reference in New Issue
Block a user