dect
/
asterisk
Archived
13
0
Fork 0

Merged revisions 49536 via svnmerge from

https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r49536 | kpfleming | 2007-01-04 15:58:42 -0600 (Thu, 04 Jan 2007) | 2 lines

don't mark these allocations as 'cache' allocations when caching has been disabled

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@49538 f38db490-d61c-443f-a65b-d21fe96a405b
This commit is contained in:
kpfleming 2007-01-04 21:59:06 +00:00
parent a3df7ad6e7
commit 779a16372f
2 changed files with 10 additions and 4 deletions

View File

@ -959,13 +959,17 @@ struct iax_frame *iax_frame_new(int direction, int datalen, unsigned int cacheab
}
AST_LIST_TRAVERSE_SAFE_END
}
#endif
if (!fr) {
if (!(fr = ast_calloc_cache(1, sizeof(*fr) + datalen)))
return NULL;
fr->mallocd_datalen = datalen;
}
#else
if (!(fr = ast_calloc(1, sizeof(*fr) + datalen)))
return NULL;
fr->mallocd_datalen = datalen;
#endif
fr->direction = direction;
fr->retrans = -1;

View File

@ -304,10 +304,12 @@ static struct ast_frame *ast_frame_header_new(void)
return f;
}
}
#endif
if (!(f = ast_calloc_cache(1, sizeof(*f))))
return NULL;
#else
if (!(f = ast_calloc(1, sizeof(*f))))
return NULL;
#endif
f->mallocd_hdr_len = sizeof(*f);
#ifdef TRACE_FRAMES