diff options
author | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-08-29 20:50:36 +0000 |
---|---|---|
committer | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-08-29 20:50:36 +0000 |
commit | 53f8d43e2945038fe3059fd6c1c00dd4ec117505 (patch) | |
tree | 0f3fc04bcb07ac328d54ffb2fed0333dfffb44de /apps/app_mixmonitor.c | |
parent | 562decf81af443d24afd3f1fc3d133b8b2b7cee3 (diff) |
Merge team/russell/frame_caching
There are some situations in Asterisk where ast_frame and/or iax_frame
structures are rapidly allocatted and freed (at least 50 times per second
for one call).
This code significantly improves the performance of ast_frame_header_new(),
ast_frdup(), ast_frfree(), iax_frame_new(), and iax_frame_free() by keeping
a thread-local cache of these structures and using frames from the cache
whenever possible instead of calling malloc/free every time.
This commit also converts the ast_frame and iax_frame structures to use the
linked list macros.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@41278 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps/app_mixmonitor.c')
-rw-r--r-- | apps/app_mixmonitor.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/app_mixmonitor.c b/apps/app_mixmonitor.c index 2aaf7d6a8..aa7602f65 100644 --- a/apps/app_mixmonitor.c +++ b/apps/app_mixmonitor.c @@ -191,7 +191,7 @@ static void *mixmonitor_thread(void *obj) of frames if a queue flush was necessary, so process them */ for (; f; f = next) { - next = f->next; + next = AST_LIST_NEXT(f, frame_list); if (write) ast_writestream(mixmonitor->fs, f); ast_frfree(f); |