mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-12 07:35:18 +00:00
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
This commit is contained in:
@@ -410,7 +410,7 @@ struct ast_channel {
|
||||
unsigned int pickupgroup; /*!< Pickup group - which calls groups can be picked up? */
|
||||
unsigned int flags; /*!< channel flags of AST_FLAG_ type */
|
||||
unsigned short transfercapability; /*!< ISDN Transfer Capbility - AST_FLAG_DIGITAL is not enough */
|
||||
struct ast_frame *readq;
|
||||
AST_LIST_HEAD_NOLOCK(, ast_frame) readq;
|
||||
int alertpipe[2];
|
||||
|
||||
int nativeformats; /*!< Kinds of data this channel can natively handle */
|
||||
|
Reference in New Issue
Block a user