From f7e7161607512ae516d4a3976048e2f0d29e5449 Mon Sep 17 00:00:00 2001 From: Russell Bryant Date: Tue, 29 Aug 2006 20:50:36 +0000 Subject: 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: https://origsvn.digium.com/svn/asterisk/trunk@41278 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- include/asterisk/slinfactory.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/asterisk/slinfactory.h') diff --git a/include/asterisk/slinfactory.h b/include/asterisk/slinfactory.h index 4bdbfa7cd..b81817d6b 100644 --- a/include/asterisk/slinfactory.h +++ b/include/asterisk/slinfactory.h @@ -32,7 +32,7 @@ extern "C" { #endif struct ast_slinfactory { - struct ast_frame *queue; + AST_LIST_HEAD_NOLOCK(, ast_frame) queue; struct ast_trans_pvt *trans; short hold[1280]; short *offset; -- cgit v1.2.3