core: Disable astobj2 locking for some common objects.

* ACO options
* Indications
* Module loader ref_debug object
* Media index info and variants
* xmldoc items

These allocation locations were identified using reflocks.py on the
master branch.

Change-Id: Ie999b9941760be3d1946cdb6e30cb85fd97504d8
This commit is contained in:
Corey Farrell
2018-10-01 23:12:14 -04:00
parent f066dbc353
commit 3b2310332d
5 changed files with 17 additions and 7 deletions

View File

@@ -2290,7 +2290,9 @@ static struct ast_xml_doc_item *ast_xml_doc_item_alloc(const char *name, const c
{
struct ast_xml_doc_item *item;
if (!(item = ao2_alloc(sizeof(*item), ast_xml_doc_item_destructor))) {
item = ao2_alloc_options(sizeof(*item), ast_xml_doc_item_destructor,
AO2_ALLOC_OPT_LOCK_NOLOCK);
if (!item) {
ast_log(AST_LOG_ERROR, "Failed to allocate memory for ast_xml_doc_item instance\n");
return NULL;
}