Asterisk - The Open Source Telephony Project  18.5.0
Macros | Functions
astmm.h File Reference

Asterisk memory management routines. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define _ASTERISK_ASTMM_H
 
#define ASTMM_BLOCK   0
 ASTMM_LIBC can be defined to control the meaning of standard allocators. More...
 
#define ASTMM_REDIRECT   1
 Redirect standard allocators to use Asterisk functions. More...
 
#define ASTMM_IGNORE   2
 Standard allocators are used directly. More...
 
#define ASTMM_LIBC   ASTMM_BLOCK
 
#define calloc(a, b)   Do_not_use_calloc__use_ast_calloc->fail(a, b)
 
#define malloc(a)   Do_not_use_malloc__use_ast_malloc->fail(a)
 
#define free(a)   Do_not_use_free__use_ast_free_or_ast_std_free_for_remotely_allocated_memory->fail(a)
 
#define realloc(a, b)   Do_not_use_realloc__use_ast_realloc->fail(a, b)
 
#define strdup(a)   Do_not_use_strdup__use_ast_strdup->fail(a)
 
#define strndup(a, b)   Do_not_use_strndup__use_ast_strndup->fail(a, b)
 
#define asprintf(a, b, c...)   Do_not_use_asprintf__use_ast_asprintf->fail(a, b, c)
 
#define vasprintf(a, b, c)   Do_not_use_vasprintf__use_ast_vasprintf->fail(a, b, c)
 
#define ast_free(a)   __ast_free(a, __FILE__, __LINE__, __PRETTY_FUNCTION__)
 
#define ast_malloc(len)   __ast_malloc((len), __FILE__, __LINE__, __PRETTY_FUNCTION__)
 A wrapper for malloc() More...
 
#define ast_calloc(num, len)   __ast_calloc((num), (len), __FILE__, __LINE__, __PRETTY_FUNCTION__)
 A wrapper for calloc() More...
 
#define ast_calloc_cache(num, len)   __ast_calloc_cache((num), (len), __FILE__, __LINE__, __PRETTY_FUNCTION__)
 A wrapper for calloc() for use in cache pools. More...
 
#define ast_realloc(p, len)   __ast_realloc((p), (len), __FILE__, __LINE__, __PRETTY_FUNCTION__)
 A wrapper for realloc() More...
 
#define ast_strdup(str)   __ast_strdup((str), __FILE__, __LINE__, __PRETTY_FUNCTION__)
 A wrapper for strdup() More...
 
#define ast_strndup(str, len)   __ast_strndup((str), (len), __FILE__, __LINE__, __PRETTY_FUNCTION__)
 A wrapper for strndup() More...
 
#define ast_asprintf(ret, fmt, ...)   __ast_asprintf(__FILE__, __LINE__, __PRETTY_FUNCTION__, (ret), (fmt), __VA_ARGS__)
 A wrapper for asprintf() More...
 
#define ast_vasprintf(ret, fmt, ap)   __ast_vasprintf((ret), (fmt), (ap), __FILE__, __LINE__, __PRETTY_FUNCTION__)
 A wrapper for vasprintf() More...
 
#define ast_alloca(size)   __builtin_alloca(size)
 call __builtin_alloca to ensure we get gcc builtin semantics More...
 
#define ast_strdupa(s)
 duplicate a string in memory from the stack More...
 

Functions

int __ast_asprintf (const char *file, int lineno, const char *func, char **strp, const char *format,...)
 
void * __ast_calloc (size_t nmemb, size_t size, const char *file, int lineno, const char *func) attribute_malloc
 
void * __ast_calloc_cache (size_t nmemb, size_t size, const char *file, int lineno, const char *func) attribute_malloc
 
void __ast_free (void *ptr, const char *file, int lineno, const char *func)
 
void * __ast_malloc (size_t size, const char *file, int lineno, const char *func) attribute_malloc
 
void * __ast_realloc (void *ptr, size_t size, const char *file, int lineno, const char *func)
 
int __ast_repl_asprintf (const char *file, int lineno, const char *func, char **strp, const char *format,...)
 
void * __ast_repl_calloc (size_t nmemb, size_t size, const char *file, int lineno, const char *func) attribute_malloc
 
void * __ast_repl_malloc (size_t size, const char *file, int lineno, const char *func) attribute_malloc
 
void * __ast_repl_realloc (void *ptr, size_t size, const char *file, int lineno, const char *func)
 
char * __ast_repl_strdup (const char *s, const char *file, int lineno, const char *func) attribute_malloc
 
char * __ast_repl_strndup (const char *s, size_t n, const char *file, int lineno, const char *func) attribute_malloc
 
int __ast_repl_vasprintf (char **strp, const char *format, va_list ap, const char *file, int lineno, const char *func)
 
char * __ast_strdup (const char *s, const char *file, int lineno, const char *func) attribute_malloc
 
char * __ast_strndup (const char *s, size_t n, const char *file, int lineno, const char *func) attribute_malloc
 
int __ast_vasprintf (char **strp, const char *format, va_list ap, const char *file, int lineno, const char *func)
 
void ast_free_ptr (void *ptr)
 free() wrapper More...
 
void * ast_std_calloc (size_t nmemb, size_t size) attribute_malloc
 
void ast_std_free (void *ptr)
 
void * ast_std_malloc (size_t size) attribute_malloc
 
void * ast_std_realloc (void *ptr, size_t size)
 

Detailed Description

Asterisk memory management routines.

This file should never be #included directly, it is included by asterisk.h.

Definition in file astmm.h.

Macro Definition Documentation

◆ _ASTERISK_ASTMM_H

#define _ASTERISK_ASTMM_H

Definition at line 31 of file astmm.h.

◆ asprintf

#define asprintf (   a,
  b,
  c... 
)    Do_not_use_asprintf__use_ast_asprintf->fail(a, b, c)

Definition at line 169 of file astmm.h.

◆ ast_alloca

#define ast_alloca (   size)    __builtin_alloca(size)

call __builtin_alloca to ensure we get gcc builtin semantics

Parameters
sizeThe size of the buffer we want allocated

This macro will attempt to allocate memory from the stack. If it fails you won't get a NULL returned, but a SEGFAULT if you're lucky.

Examples:
/usr/src/asterisk-18.5.0/include/asterisk/strings.h, and /usr/src/asterisk-18.5.0/main/app.c.

Definition at line 290 of file astmm.h.

Referenced by __analog_handle_event(), __ast_named_lock_get(), _if_exec(), _while_exec(), acf_vm_info(), add_eyebeam(), add_hints(), ael2_semantic_check(), after_bridge_move_channel(), alsa_card_init(), aMYSQL_set(), ast_bucket_alloc(), ast_bucket_file_alloc(), ast_dsp_process(), ast_dsp_silence_noise_with_energy(), ast_event_append_ie_str(), ast_fileexists(), ast_lock_path_flock(), ast_lock_path_lockfile(), ast_media_index_update_for_file(), ast_mkdir(), ast_openstream_full(), ast_openvstream(), ast_pjproject_get_buildopt(), ast_pthread_create_detached_stack(), ast_pthread_create_stack(), ast_remotecontrol(), ast_say_counted_adjective(), ast_say_counted_noun(), ast_sip_cli_print_sorcery_objectset(), ast_sip_get_transport_name(), ast_sip_modify_id_header(), ast_sip_pubsub_register_body_generator(), ast_sorcery_object_fields_register(), AST_TEST_DEFINE(), ast_threadpool_create(), ast_unlock_path_flock(), ast_unlock_path_lockfile(), ast_unreal_new_channels(), ast_waitfor_nandfds(), ast_websocket_write(), astman_append_json(), bridge_channel_queue_action_data_sync(), bridge_merge(), bridge_merge_locked(), bucket_file_wizard_retrieve(), bucket_wizard_retrieve(), callerid_feed(), callerid_feed_jp(), CB_ADD_LEN(), chan_pjsip_incoming_response_update_cause(), cli_endpoint_print_body(), cli_list_subscriptions_inout(), cli_show_subscriptions_inout(), config_module(), control_streamfile(), cpeid_exec(), create_addr_from_peer(), create_new_id_hdr(), curl_header_callback(), cut_internal(), db_open(), decode_frame(), device_state_cb(), digest_check_auth(), digest_create_request_with_auth(), dns_naptr_sort(), does_category_match(), dundi_decrypt(), dundi_encrypt(), dundi_precache_internal(), dynamic_dtmf_hook_trip(), encrypt_frame(), external_media_audiosocket_tcp(), external_media_rtp_udp(), festival_exec(), filename_parse(), find_aor(), find_aor_name(), find_by_channel(), find_database(), find_table(), find_user(), framehook_list_push_event(), func_mchan_read(), function_fieldnum_helper(), function_fieldqty_helper(), handle_clear_alarms(), handle_cli_config_reload(), handle_cli_mobile_search(), handle_command_response(), handle_find_file(), handle_incoming(), handle_new_invite_request(), handle_response_invite(), import_helper(), incoming_in_dialog_request(), initial_notify_task(), inotify_daemon(), inprocess_count(), is_video_dest(), jingle_action_session_terminate(), listfilter(), lua_get_variable(), lua_get_variable_value(), lua_read_extensions_file(), payload_helper_playfile(), pbx_builtin_importvar(), pbx_load_module(), play_mailbox_owner(), presence_state_cb(), process_my_load_module(), publish_request_initial(), pubsub_on_rx_mwi_notify_request(), pubsub_on_rx_subscribe_request(), queue_file(), read_dirs_cb(), read_header(), record_file(), refer_blind_callback(), refer_incoming_refer_request(), register_aor_core(), registrar_contact_delete(), replace(), session_on_rx_request(), set_bridge_peer_vars_multiparty(), set_sipdomain_variable(), shared_read(), shared_write(), shift_pop(), sip_addheader(), sms_generate(), socket_process_helper(), sort_internal(), spy_sayname(), start_automixmonitor(), start_automonitor(), stasis_state_manager_create(), stasis_topic_pool_create(), state_manager_dtor(), state_notify_build_xml(), static_callback(), strreplace(), sub_persistence_recreate(), test_semi(), test_xml_entry(), threadstorage_init(), topic_pool_dtor(), try_firmware(), unshift_push(), update_to_uri(), vm_delete(), vm_msg_forward(), vm_msg_move(), vm_msg_remove(), vm_play_folder_name_gr(), and websocket_combine_key().

◆ ast_asprintf

#define ast_asprintf (   ret,
  fmt,
  ... 
)    __ast_asprintf(__FILE__, __LINE__, __PRETTY_FUNCTION__, (ret), (fmt), __VA_ARGS__)

A wrapper for asprintf()

ast_asprintf() is a wrapper for asprintf() that will generate an Asterisk log message in the case that the allocation fails.

The arguments and return value are the same as asprintf()

Definition at line 269 of file astmm.h.

Referenced by app_create(), append_source_stream(), append_vmu_info_astman(), ari_bridges_play_helper(), ari_channels_handle_play(), ast_ari_bridges_record(), ast_ari_channels_record(), ast_channel_internal_setup_topics(), ast_copy_pj_str2(), ast_endpoint_latest_snapshot(), ast_pthread_create_stack(), ast_sip_session_media_state_add(), ast_stir_shaken_verify(), ast_xmldoc_load_documentation(), astman_append_headers(), auth_http_callback(), bridge_topics_init(), build_filename(), build_peer(), cli_complete(), complete_dialplan_remove_extension(), convert_bdb_to_sqlite3(), create_temp_file(), crypto_get_attrib(), curl_public_key(), dahdi_cc_callback(), dial_exec_full(), double_handler_fn(), dtlsrekey_to_str(), endpoint_internal_create(), expiration_struct2str(), fetch_access_token(), fetch_google_access_token(), find_table(), handle_find_recording(), handle_gosub(), handle_incoming_sdp(), handle_scan_file(), hook_thread_arg_alloc(), init_acf_query(), int_handler_fn(), internal_stasis_subscribe(), manager_park_bridged(), module_load_helper_on_file(), multi_object_blob_to_ami(), on_moh_file(), persistence_expires_struct2str(), process_media_file(), res_sdp_crypto_build_offer(), setup_mixmonitor_ds(), sorcery_memory_cache_load(), split_path(), stasis_app_control_record(), stasis_caching_topic_create(), stasis_cp_all_create(), stasis_topic_pool_get_topic(), state_alloc(), store_config(), timeval_struct2str(), tos_audio_to_str(), tos_to_str(), tos_video_to_str(), try_calling(), uint_handler_fn(), xmldoc_get_syntax_fun(), xmldoc_parse_enum(), xmldoc_parse_info(), xmldoc_parse_option(), xmldoc_parse_parameter(), and xmldoc_parse_variablelist().

◆ ast_calloc

#define ast_calloc (   num,
  len 
)    __ast_calloc((num), (len), __FILE__, __LINE__, __PRETTY_FUNCTION__)

A wrapper for calloc()

ast_calloc() is a wrapper for calloc() that will generate an Asterisk log message in the case that the allocation fails.

The arguments and return value are the same as calloc()

Examples:
/usr/src/asterisk-18.5.0/main/app.c.

Definition at line 204 of file astmm.h.

Referenced by __after_bridge_set_goto(), __ast_context_create(), __ast_dsp_new(), __ast_format_def_register(), __ast_http_post_load(), __ast_module_user_add(), __ast_pbx_run(), __init_manager(), _ast_register_timing_interface(), _parse(), _sip_show_peers(), accept_thread(), acf_curlopt_write(), acf_iaxvar_write(), acf_odbc_read(), acl_new(), aco_info_init(), action_originate(), add_action_to_menu_entry(), add_agi_cmd(), add_event_to_list(), add_features_datastore(), add_identity_header(), add_ids(), add_menu_entry(), add_msg_header(), add_pattern_node(), add_peer_mailboxes(), add_realm_authentication(), add_redirect(), add_sip_domain(), add_to_agi(), add_to_load_order(), adjust_frame_for_plc(), aes_helper(), after_bridge_cb_setup(), ALLOC_COMMENT(), alloc_jb_frame(), alloc_profile(), allocate_body_part(), allocate_subscription(), analog_new(), answer_exec_enable(), anti_injection(), ao2_weakproxy_subscribe(), app_exec(), append_ha_core(), append_history_va(), append_permission(), apply_menu_to_user(), apply_plc(), ari_channels_handle_originate_with_id(), ast_add_extension2(), ast_add_extension2_lockopt(), ast_add_hint(), ast_add_profile(), ast_aoc_create(), ast_aoc_decode(), ast_aoc_encode(), ast_app_group_set_channel(), ast_append_acl(), ast_ari_bridges_record(), ast_ari_channels_create(), ast_ari_events_event_websocket_ws_attempted_cb(), ast_ari_events_event_websocket_ws_established_cb(), ast_audiohook_attach(), ast_autochan_setup(), ast_autoservice_start(), ast_base64encode_string(), ast_bridge_channel_establish_roles(), ast_bridge_set_after_callback(), ast_category_inherit(), ast_category_new(), ast_cc_agent_register(), ast_cc_agent_status_response(), ast_cc_build_frame(), ast_cc_extension_monitor_add_dialstring(), ast_cc_monitor_failed(), ast_cc_monitor_register(), ast_cdr_alloc(), ast_channel_iterator_all_new(), ast_channel_iterator_by_exten_new(), ast_channel_iterator_by_name_new(), ast_channel_register(), ast_channel_start_silence_generator(), ast_cli_completion_vector(), ast_cli_perms_init(), ast_config_new(), ast_context_add_ignorepat2(), ast_context_add_include2(), ast_context_add_switch2(), ast_context_find_or_create(), ast_data_buffer_alloc(), ast_devstate_changed_literal(), ast_devstate_prov_add(), ast_dial_append(), ast_dial_append_channel(), ast_dial_create(), ast_dns_resolver_set_result(), ast_dnsmgr_get_family(), ast_duplicate_acl_list(), ast_duplicate_ha(), ast_el_strtoarr(), ast_event_new(), ast_fax_tech_register(), ast_framehook_attach(), ast_get_enum(), ast_iax2_new(), ast_include_new(), ast_jb_create_framehook(), ast_linear_stream(), ast_lock_path_flock(), ast_merge_contexts_and_delete(), ast_monitor_start(), ast_msg_data_alloc(), ast_msg_var_iterator_init(), ast_multicast_rtp_create_options(), ast_netsock_bindaddr(), ast_netsock_list_alloc(), ast_odbc_find_table(), ast_presence_state_prov_add(), ast_realtime_append_mapping(), ast_register_application2(), ast_register_thread(), ast_rtcp_generate_report(), ast_rtcp_interpret(), ast_rtp_new(), ast_rtp_prop_set(), ast_safe_fork(), ast_sched_context_create(), ast_sched_start_thread(), ast_sdp_srtp_alloc(), ast_setlocale(), ast_setup_cc_recall_datastore(), ast_sip_auths_to_str(), ast_sip_register_endpoint_identifier_with_name(), ast_sip_service_route_vector_alloc(), ast_sip_session_media_stats_save(), ast_smoother_new(), ast_sorcery_object_fields_register(), ast_speech_new(), ast_srtp_policy_set_master_key(), ast_srv_lookup(), ast_ssl_init(), ast_stir_shaken_add_verification(), ast_stir_shaken_sign(), ast_stir_shaken_verify(), ast_stream_alloc(), ast_stream_clone(), ast_strftime_locale(), ast_tcptls_server_start(), AST_TEST_DEFINE(), ast_threadstorage_get(), ast_timer_open(), ast_udptl_new_with_bindaddr(), ast_var_assign(), ast_var_list_create(), ast_variable_new(), AST_VECTOR(), ast_xmldoc_load_documentation(), asterisk_start_devicestate_publishing(), asterisk_start_mwi_publishing(), audiohook_volume_get(), audiosocket_request(), authenticate_reply(), available(), bridge_channel_impart_add(), bridge_manager_service_req(), bridges_scrape_cb(), build_conf(), build_context(), build_device(), build_gateway(), build_mapping(), build_peer(), build_user(), caldav_add_event(), caller_id_to_str(), callerid_new(), callgroup_to_str(), category_register(), cc_generic_agent_init(), cc_generic_monitor_request_cc(), cc_interfaces_datastore_init(), cc_recall_ds_duplicate(), cc_request_state_change(), cdr_detach(), cdr_generic_register(), cdr_object_create_public_records(), celt_clone(), cfmtime_new(), chan_pjsip_incoming_request(), channel_set_external_vars(), channels_scrape_cb(), check_match(), compile_script(), complex_task_data_alloc(), conf_add_post_join_action(), conf_menu_profile_copy(), config_cache_attribute(), config_function_read(), config_ldap(), config_line(), config_module(), config_parse_variables(), cops_gate_cmd(), copy_menu_entry(), copy_rules(), create_client(), create_followme_number(), create_parked_subscription_full(), create_transaction(), create_video_frame(), create_vmaccount(), curl_cb_data_create(), dahdi_timer_open(), data_buffer_payload_alloc(), dec_init(), deep_copy_peer(), default_listener_pvt_alloc(), defer_full_frame(), delayed_request_alloc(), detect_write(), dial_exec_full(), dial_features_duplicate(), dialed_cc_interfaces_duplicate(), dialog_info_generate_body_content(), display_single_entry(), dns_naptr_alloc(), dns_srv_alloc(), dns_txt_alloc(), do_directory(), do_monitor(), do_proxy_auth(), dtmfstore_exec(), dundi_answer_entity(), dundi_answer_query(), dundi_prop_precache(), dundi_query_read(), dundi_send(), endelm(), endpoints_scrape_cb(), enum_query_read(), expression_token_alloc(), exten_state_pub_data_alloc(), extension_monitor_pvt_init(), fax_session_new(), fbuf_append(), find_cache(), find_idle_thread(), find_or_create(), find_table(), find_table_cb(), find_tpeer(), find_user(), find_user_realtime(), findmeexec(), fixed_jb_new(), frame_drop_helper(), frame_trace_helper(), func_channel_write_real(), func_confbridge_helper(), gen_alloc(), generic_record_alloc(), get_chan_by_ast_name(), get_lock(), get_name_from_resource(), get_park_common_datastore_copy(), get_replace_channel_store(), get_robin_position(), gosub_allocate_frame(), gosub_exec(), h263_clone(), h264_clone(), handle_cli_test_locales(), handle_command_response(), handle_debug_or_trace(), handle_manager_show_events(), handle_remb_set(), handle_show_threads(), holding_bridge_join(), hook_state_alloc(), hook_thread_arg_alloc(), iax2_append_register(), iax2_dup_variable_datastore(), iax_frame_new(), iax_process_template(), icalendar_add_event(), ignorepat_alloc(), include_alloc(), init_acf_query(), init_convolve_channel(), init_convolve_data(), insert_penaltychange(), internal_ao2_traverse(), internal_sip_session_media_state_alloc(), internal_type_init(), io_context_create(), jb_new(), keypad_cfg_read(), launch_monitor_thread(), load_config(), load_dlopen(), load_module(), load_pktccops_config(), load_realtime_rules(), load_values_config(), make_channel(), make_cont(), make_entry(), make_logchannel(), make_silence(), make_test1(), matrix_resize(), mbl_load_adapter(), mbl_load_device(), message_template_create(), message_template_parse_filebody(), milliwatt_alloc(), misdn_cfg_init(), misdn_jb_init(), mkif(), mkintf(), mock_cdr_backend_cb(), moh_alloc(), moh_files_alloc(), mohalloc(), msg_queue_push(), msg_queue_push_data(), multicast_rtp_new(), mvm_user_alloc(), mwi_send_init(), my_connect_db(), my_load_config_string(), native_bridge_create(), native_bridge_join(), native_rtp_bridge_channel_data_alloc(), nbs_alloc(), new_category(), new_outgoing(), newpvt(), ooh323_alloc(), ooh323_request(), ooh323c_start_call_thread(), openssl_error_string(), optional_api_create(), optional_api_user_create(), osp_create_provider(), page_exec(), park_announce_subscription_data_create(), parse_cdata(), parse_config(), parse_contact_header(), parse_srv(), parse_via(), pickupgroup_to_str(), pitchshift_helper(), playtones_alloc(), process_my_load_module(), process_sdp(), prometheus_metric_create(), publisher_client_send(), queue_file(), queue_file_create(), queue_reload_request(), queue_ringing_trunk(), queue_signalling(), realtime_ldap_result_to_vars(), realtime_multi_pgsql(), realtime_pgsql(), receive_ademco_event(), receivefax_exec(), register_atexit(), register_translator(), release_doomed_pris(), reload_config(), reload_queue_rules(), req_alloc(), res_srtp_new(), reschedule_precache(), response_alloc(), restart_monitor(), rtp_ioqueue_thread_get_or_create(), rtp_red_init(), rtp_reload(), sched_alloc(), scramble_write(), sdp_crypto_alloc(), secure_call_store_duplicate(), sendfax_exec(), session_refresh_state_get_or_alloc(), set_dial_masquerade(), set_hold_intercept(), set_mid_and_bundle_group(), set_talk_detect(), setup_bridge_role(), setup_bridge_role_option(), setup_bridge_roles_datastore(), setup_mixmonitor_ds(), setup_park_common_datastore(), shared_write(), simple_task_data_alloc(), sip_cc_agent_init(), sip_cc_monitor_suspend(), sip_epa_register(), sip_notify_alloc(), sip_prepare_socket(), sip_request_call(), sip_st_alloc(), skinny_device_alloc(), skinny_line_alloc(), skinny_new(), skinny_session(), sla_create_failed_station(), sla_create_ringing_station(), sla_queue_event_full(), smdi_msg_retrieve_read(), socket_process_helper(), softmix_bridge_create(), softmix_bridge_join(), softmix_mixing_array_init(), softmix_translate_helper_entry_alloc(), sorcery_memory_cache_thrash_create(), sorcery_object_type_alloc(), sorcery_realtime_open(), spandsp_fax_new(), spawn_dp_lookup(), speech_background(), speex_write(), srv_datastore_setup(), sstate_alloc(), start_network_thread(), startelm(), stasis_app_control_continue(), stasis_app_control_dtmf(), stasis_app_control_move(), stasis_app_control_mute(), stasis_app_control_set_channel_var(), stasis_app_control_snoop(), stasis_app_control_unmute(), stasis_config_alloc(), stimulate_attended_transfer(), stir_shaken_sign(), stir_shaken_verify_json(), stir_shaken_verify_signature(), store_by_locale(), store_config(), substituted(), supplement_dup(), sw_alloc(), t38_state_get_or_alloc(), table_config_new(), tdd_feed(), tdd_new(), test_alloc(), test_cb_data_alloc(), test_core_format_clone(), test_listener_pvt_alloc(), test_vm_api_create_mock_snapshot(), threadstorage_init(), timezone_add(), tonepair_alloc(), topology_change_refresh_data_alloc(), tps_task_alloc(), tps_task_alloc_local(), transmit_response(), transport_bind_to_str(), tree_node_alloc(), try_calling(), try_firmware(), try_load_key(), unistim_alloc_sub(), unistim_line_alloc(), vm_allocate_dh(), vm_mailbox_snapshot_create(), vm_msg_snapshot_alloc(), volume_write(), and xmpp_pak_message().

◆ ast_calloc_cache

#define ast_calloc_cache (   num,
  len 
)    __ast_calloc_cache((num), (len), __FILE__, __LINE__, __PRETTY_FUNCTION__)

A wrapper for calloc() for use in cache pools.

ast_calloc_cache() is a wrapper for calloc() that will generate an Asterisk log message in the case that the allocation fails. When memory debugging is in use, the memory allocated by this function will be marked as 'cache' so it can be distinguished from normal memory allocations.

The arguments and return value are the same as calloc()

Definition at line 217 of file astmm.h.

◆ ast_free

#define ast_free (   a)    __ast_free(a, __FILE__, __LINE__, __PRETTY_FUNCTION__)
Examples:
/usr/src/asterisk-18.5.0/main/app.c.

Definition at line 182 of file astmm.h.

Referenced by __ao2_ref(), __ast_calloc_with_stringfields(), __ast_cli_generator(), __ast_cli_register(), __ast_context_destroy(), __ast_datastore_alloc(), __ast_file_read_dirs(), __ast_http_load(), __ast_http_post_load(), __ast_internal_context_destroy(), __ast_module_user_hangup_all(), __ast_module_user_remove(), __ast_pbx_run(), __ast_sorcery_apply_config(), __ast_string_field_free_memory(), __ast_string_field_release_active(), __ast_test_status_update(), __ast_test_suite_event_notify(), __ast_trace(), __ast_unregister_atexit(), __frame_free(), __init_manager(), __sip_scheddestroy(), __start_mwi_subscription(), __start_reregister_timeout(), __unload_module(), _ast_hashtab_create(), _ast_hashtab_dup(), _ast_hashtab_resize(), _ast_heap_create(), _ast_xmldoc_build_arguments(), _ast_xmldoc_build_seealso(), _free_general_cfg(), _free_msn_list(), _free_port_cfg(), _macro_exec(), _parse(), _sip_show_peer(), _sip_show_peers(), _xmldoc_build_field(), acf_curl_exec(), acf_curl_helper(), acf_curlopt_write(), acf_cut_exec(), acf_faxopt_read(), acf_fetch(), acf_retrieve_docs(), aco_info_destroy(), action_agents(), action_cancel_atxfer(), action_command(), action_confbridgelist_item(), action_coreshowchannels(), action_getconfig(), action_getconfigjson(), action_hangup(), action_originate(), actual_load_config(), add_action_to_menu_entry(), add_agi_cmd(), add_bundle_groups(), add_cfg_entry(), add_crypto_to_stream(), add_extension(), add_hintdevice(), add_ice_to_stream(), add_identity_header(), add_menu_entry(), add_priority(), add_required_respheader(), add_route(), add_sdp(), add_to_load_order(), adjust_frame_for_plc(), adsi_prog(), aes_helper(), after_bridge_cb_destroy(), after_bridge_cb_run_discard(), after_bridge_goto_destroy(), agent_login_to_ami(), agent_logoff_to_ami(), agi_channel_to_ami(), agi_destroy_commands_cb(), alarmreceiver_exec(), ami_outbound_registration_task(), ami_registrations_aor(), ami_subscription_detail(), analog_delete(), analog_free(), analog_hangup(), analog_publish_dnd_state(), answer_exec_disable(), ao2_iterator_destroy(), ao2_weakproxy_unsubscribe(), aoc_display_decoded_debug(), aoc_to_ami(), aor_destroy(), app_control_move(), app_create(), app_exec(), app_set_replace_channel_app(), append_event(), append_expected_event_snapshot(), append_history_va(), append_source_stream(), append_vmu_info_astman(), apply_contact_acl(), apply_endpoint_contact_acl(), apply_negotiated_sdp_stream(), apply_option(), apply_options_full(), ari_bridges_play_found(), ari_bridges_play_new(), ari_channels_handle_originate_with_id(), ari_channels_handle_play(), ari_mkpasswd(), ari_originate_dial(), ast_add_extension2_lockopt(), ast_agi_unregister(), ast_aoc_destroy_decoded(), ast_aoc_destroy_encoded(), ast_aoc_test_encode_decode_match(), ast_app_group_discard(), ast_app_group_set_channel(), ast_app_group_update(), ast_app_run_macro(), ast_app_run_sub(), ast_ari_applications_subscribe_cb(), ast_ari_applications_subscribe_parse_body(), ast_ari_applications_unsubscribe_cb(), ast_ari_applications_unsubscribe_parse_body(), ast_ari_asterisk_get_global_var(), ast_ari_asterisk_get_info_cb(), ast_ari_asterisk_get_info_parse_body(), ast_ari_bridges_add_channel_cb(), ast_ari_bridges_add_channel_parse_body(), ast_ari_bridges_play_cb(), ast_ari_bridges_play_parse_body(), ast_ari_bridges_play_with_id_cb(), ast_ari_bridges_play_with_id_parse_body(), ast_ari_bridges_record(), ast_ari_bridges_remove_channel_cb(), ast_ari_bridges_remove_channel_parse_body(), ast_ari_callback(), ast_ari_channels_get_channel_var(), ast_ari_channels_play_cb(), ast_ari_channels_play_parse_body(), ast_ari_channels_play_with_id_cb(), ast_ari_channels_play_with_id_parse_body(), ast_ari_channels_record(), ast_ari_events_event_websocket_ws_attempted_cb(), ast_ari_events_event_websocket_ws_established_cb(), ast_ari_events_user_event_cb(), ast_ari_events_user_event_parse_body(), ast_ari_get_docs(), ast_audiohook_detach_list(), ast_audiosocket_connect(), ast_audiosocket_receive_frame(), ast_autochan_destroy(), ast_autoservice_start(), ast_autoservice_stop(), ast_bridge_features_destroy(), ast_bridge_run_after_callback(), ast_category_destroy(), ast_cc_agent_set_interfaces_chanvar(), ast_cc_agent_status_response(), ast_cc_agent_unregister(), ast_cc_build_frame(), ast_cc_config_params_destroy(), ast_cc_monitor_failed(), ast_cc_monitor_unregister(), ast_cdr_free(), ast_cdr_generic_unregister(), ast_channel_destructor(), ast_channel_internal_setup_topics(), ast_channel_iterator_by_exten_new(), ast_channel_iterator_by_name_new(), ast_channel_iterator_destroy(), ast_channel_start_silence_generator(), ast_channel_stop_silence_generator(), ast_channel_unregister(), ast_child_verbose(), ast_cli_command_full(), ast_cli_completion_matches(), ast_cli_completion_vector(), ast_cli_perms_init(), ast_cli_unregister(), ast_comment_destroy(), ast_config_destroy(), ast_connected_line_parse_data(), ast_data_buffer_cache_adjust(), ast_data_buffer_free(), ast_data_buffer_resize(), ast_datastore_free(), ast_db_freetree(), ast_destroy_template_list(), ast_destroy_timing(), ast_devstate_prov_add(), ast_devstate_prov_del(), ast_dial_append_channel(), ast_dial_destroy(), ast_dns_result_free(), ast_dns_txt_free_strings(), ast_dns_txt_get_strings(), ast_dnsmgr_release(), ast_dsp_free(), ast_eid_to_str(), ast_el_strtoarr(), ast_endpoint_latest_snapshot(), ast_event_append_ie_raw(), ast_event_destroy(), ast_event_new(), ast_fax_tech_unregister(), ast_format_def_unregister(), ast_framehook_attach(), ast_framehook_list_destroy(), ast_free_acl_list(), ast_free_ha(), ast_free_ptr(), ast_func_read(), ast_get_enum(), ast_get_srv(), ast_get_txt(), ast_hashtab_destroy(), ast_hashtab_end_traversal(), ast_hashtab_remove_object_internal(), ast_heap_destroy(), ast_hook_send_action(), ast_http_create_response(), ast_http_get_contents(), ast_http_get_json(), ast_http_get_post_vars(), ast_http_send(), ast_http_uri_unlink_all_with_key(), ast_iax2_new(), ast_include_rename(), ast_includes_destroy(), ast_io_remove(), ast_iostream_printf(), ast_json_free(), ast_json_vstringf(), ast_log_backtrace(), ast_log_show_lock(), ast_logger_get_channels(), ast_logger_remove_channel(), ast_logger_unregister_level(), ast_manager_build_bridge_state_string_prefix(), ast_manager_build_channel_state_string_prefix(), ast_manager_register2(), ast_merge_contexts_and_delete(), ast_monitor_start(), ast_monitor_stop(), ast_msg_var_iterator_destroy(), ast_multicast_rtp_free_options(), ast_netsock_bindaddr(), ast_netsock_destroy(), ast_netsock_release(), ast_odbc_direct_execute(), ast_odbc_execute_sql(), ast_odbc_prepare(), ast_odbc_prepare_and_execute(), ast_odbc_release_obj(), ast_parse_digest(), ast_party_dialed_copy(), ast_party_dialed_free(), ast_party_dialed_set(), ast_party_id_copy(), ast_party_id_free(), ast_party_id_set(), ast_party_name_copy(), ast_party_name_free(), ast_party_name_set(), ast_party_number_copy(), ast_party_number_free(), ast_party_number_set(), ast_party_redirecting_reason_copy(), ast_party_redirecting_reason_free(), ast_party_redirecting_reason_set(), ast_party_subaddress_copy(), ast_party_subaddress_free(), ast_party_subaddress_set(), ast_pbx_hangup_handler_destroy(), ast_pbx_hangup_handler_pop(), ast_pbx_hangup_handler_push(), ast_pbx_hangup_handler_run(), ast_playtones_start(), ast_presence_state_helper(), ast_presence_state_prov_del(), ast_process_pending_reloads(), ast_read_textfile(), ast_readfile(), ast_recvchar(), ast_redirecting_parse_data(), ast_register_application2(), ast_rtp_destroy(), ast_rtp_dtls_cfg_free(), ast_rtp_dtls_cfg_parse(), ast_rtp_ice_candidate_destroy(), ast_rtp_prop_set(), ast_rtp_read(), ast_rtp_remote_address_set(), ast_rtp_stop(), ast_run_atexits(), ast_safe_mkdir(), ast_say_number_full_en(), ast_say_number_full_ka(), ast_sched_context_destroy(), ast_sdp_srtp_destroy(), ast_sendtext(), ast_serializer_pool_destroy(), ast_set_callerid(), ast_set_cc_interfaces_chanvar(), ast_set_default_eid(), ast_setup_cc_recall_datastore(), ast_sip_auth_vector_destroy(), ast_sip_auth_vector_init(), ast_sip_cli_traverse_objects(), ast_sip_default_outbound_endpoint(), ast_sip_destroy_sorcery_global(), ast_sip_format_contact_ami(), ast_sip_persistent_endpoint_update_state(), ast_sip_register_endpoint_identifier_with_name(), ast_sip_service_route_vector_destroy(), ast_sip_session_media_state_add(), ast_sip_session_media_state_free(), ast_sip_session_media_stats_save(), ast_sip_session_remove_supplements(), ast_sip_sorcery_object_to_ami(), ast_sip_transport_state_set_preferred_identity(), ast_sip_unregister_endpoint_identifier(), ast_smoother_free(), ast_sockaddr_resolve_first_af(), ast_sorcery_objectset_json_create(), ast_sounds_get_index_for_file(), ast_speech_destroy(), ast_speech_new(), ast_speech_results_free(), ast_srtp_destroy(), ast_srtp_policy_set_master_key(), ast_srv_lookup(), ast_statsd_log_string(), ast_stir_shaken_payload_free(), ast_stir_shaken_sign(), ast_stir_shaken_verify(), ast_str_substitute_variables_full(), ast_str_to_uuid(), ast_stream_alloc(), ast_stream_clone(), ast_stream_create_resolved(), ast_stream_free(), ast_stream_set_metadata(), ast_strftime_locale(), ast_tcptls_server_start(), ast_tcptls_server_stop(), ast_test_debug(), AST_TEST_DEFINE(), ast_threadpool_set_size(), ast_threadstorage_get(), ast_timer_close(), ast_tls_read_conf(), ast_tone_zone_destructor(), ast_tone_zone_sound_destructor(), ast_udptl_destroy(), ast_udptl_new_with_bindaddr(), ast_udptl_set_tag(), ast_unreal_indicate(), ast_unregister_application(), ast_unregister_thread(), ast_unregister_timing_interface(), ast_utf8_validator_destroy(), ast_var_delete(), ast_var_list_destroy(), ast_variable_destroy(), ast_variable_list_replace(), ast_variable_lists_match(), AST_VECTOR(), ast_vector_string_split(), ast_websocket_read(), ast_writefile(), ast_xml_doc_item_destructor(), ast_xmldoc_load_documentation(), ast_xmldoc_printable(), ast_xmldoc_query(), ast_xmldoc_regenerate_doc_item(), astman_free_headers(), async_datastore_data_destroy(), async_delete_name_rec_task_data_destroy(), async_playback_task_data_destroy(), audiohook_volume_destroy(), audiosocket_hangup(), audiosocket_request(), auth_http_callback(), auth_store_cleanup(), authenticate_api_key(), authenticate_reply(), authenticate_verify(), available(), bridge_channel_control_thread(), bridge_channel_impart_ds_head_dtor(), bridge_exec(), bridge_manager_destroy(), bridge_manager_thread(), bridge_merge_cb(), bridge_role_datastore_destroy(), bridge_role_destroy(), bridge_snapshot_update(), bridge_stasis_run_cb(), bridge_topics_init(), bridges_scrape_cb(), bucket_file_update_path(), build_ami_notify(), build_body_part(), build_calendar(), build_cli_notify(), build_conf(), build_device(), build_gateway(), build_peer(), build_regex(), build_user(), cache_entry_dtor(), cache_test_data_dtor(), caldav_add_event(), caldav_get_events_between(), caldav_request(), caldav_write_event(), calendar_event_destructor(), calendar_join_attendees(), calendar_write_exec(), call_pickup_to_ami(), callattempt_free(), caller_id_handler(), caller_id_incoming_request(), caller_id_tag_handler(), callerid_free(), callerid_write(), capture_buildopts_cb(), capture_info_dtor(), category_unregister(), cc_cli_output_status(), cc_do_state_change(), cc_epa_destructor(), cc_extension_monitor_destructor(), cc_generic_agent_destructor(), cc_generic_monitor_destructor(), cc_generic_monitor_request_cc(), cc_interfaces_datastore_init(), cc_monitor_destroy(), cc_monitor_failed(), cc_recall_ds_destroy(), cc_request_state_change(), cc_status_response(), cdr_engine_shutdown(), cdr_generic_register(), cdr_handler(), cdr_object_create_public_records(), cel_bridge_enter_cb(), cel_bridge_leave_cb(), celt_destroy(), chan_data_destroy(), chan_pjsip_sendtext(), change_redirecting_information(), chanlist_free(), channel_chanspy_start_cb(), channel_chanspy_stop_cb(), channel_dial_cb(), channel_dtmf_begin_cb(), channel_dtmf_end_cb(), channel_enter_cb(), channel_fax_cb(), channel_flash_cb(), channel_get_external_vars(), channel_hangup_handler_cb(), channel_hangup_request_cb(), channel_hold_cb(), channel_leave_cb(), channel_mixmonitor_mute_cb(), channel_moh_start_cb(), channel_new_callerid(), channel_snapshot_update(), channel_unhold_cb(), channels_scrape_cb(), check_debug(), check_regcontext(), check_user_full(), clear_config_maps(), clear_mixmonitor_recipient_list(), clear_mock_cdr_backend(), clear_sip_domains(), clear_stimulus_queue(), clearvar_prefix(), cli_complete(), cli_completion_vector_add(), cli_console_dial(), cli_fax_show_sessions(), cli_list_subscriptions_inout(), cli_print_body(), cli_show_settings(), cli_show_subscription_common(), cli_show_subscriptions_inout(), cli_subsystem_alert_report(), close_client(), close_logger(), close_mailbox(), codec_prefs_handler(), codec_prefs_to_str(), compile_script(), complete_dialplan_add_ignorepat(), complete_dialplan_add_include(), complete_dialplan_remove_extension(), complete_dialplan_remove_ignorepat(), complete_dialplan_remove_include(), complex_task_data_free(), conf_free(), conf_menu_entry_destroy(), conf_menu_profile_copy(), confbridge_exec(), confbridge_join_cb(), confbridge_leave_cb(), confbridge_mute_cb(), confbridge_publish_manager_event(), confbridge_talking_cb(), confbridge_unmute_cb(), config_cache_destroy_entry(), config_cache_flush_includes(), config_function_read(), config_handler(), config_ldap(), config_module(), config_odbc(), config_option_destroy(), config_parse_variables(), config_text_file_load(), console_dial(), console_transfer(), consumer_dtor(), contact_observer_updated(), contact_user_handler(), contact_wrapper_destroy(), contacts_to_str(), contactstatus_to_ami(), control_dial_args_destroy(), control_move_cleanup(), convert_bdb_to_sqlite3(), cops_freemsg(), cops_gate_cmd(), cops_sendmsg(), copy_event_data(), corosync_ping_payload_dtor(), cpg_deliver_cb(), create_client(), create_parked_subscription_full(), create_temp_file(), create_transaction(), create_video_frame(), crypto_get_attrib(), crypto_load(), curl_and_check_expiration(), curl_cb_data_free(), curl_instance_cleanup(), curl_public_key(), curl_write_string_callback(), curlds_free(), cut_internal(), dahdi_callwait(), dahdi_cc_callback(), dahdi_destroy_channel_range(), dahdi_handle_dtmf(), dahdi_handle_event(), dahdi_hangup(), dahdi_new(), dahdi_sendtext(), dahdi_timer_close(), dahdi_timer_open(), dahdichannel_to_ami(), data_buffer_free_buffer_payload(), datastore_destroy(), datastore_destroy_cb(), dec_uninit(), default_listener_pvt_alloc(), default_listener_pvt_destroy(), deinit_req(), del_identifier(), delayed_request_free(), delete_device(), delete_devices(), delete_peers(), delete_users(), destroy(), destroy_callback(), destroy_calling_node(), destroy_conference_bridge(), destroy_dahdi_pvt(), destroy_endpoint(), destroy_exten(), destroy_fast_originate_helper(), destroy_firmware(), destroy_gateway(), destroy_header(), destroy_hint(), destroy_jack_data(), destroy_mailbox(), destroy_mailbox_mapping(), destroy_map(), destroy_msg_headers(), destroy_packet(), destroy_packets(), destroy_parked_user(), destroy_pattern_tree(), destroy_peer(), destroy_permissions(), destroy_queue(), destroy_realm_authentication(), destroy_session(), destroy_session_details(), destroy_sip_transport_state(), destroy_subscription(), destroy_table(), destroy_table_cache(), destroy_test_container(), destroy_trans(), destroy_user_perms(), device_state_cb(), dial_exec_full(), dial_target_free(), dialed_cc_interfaces_destroy(), dialgroup_refreshdb(), dialog_info_xml_state_destroy(), dictate_exec(), digest_create_request_with_auth(), display_single_entry(), dll_tests(), do_batch_backend_process(), do_devstate_changes(), do_directory(), do_monitor(), do_notify(), do_pktccops(), do_presence_state_change(), do_say(), dp_lookup_thread(), drds_destroy(), dtmfstore_exec(), dummy_start(), dump_cmd_queues(), dump_queue(), dump_queue_members(), dump_str_and_free(), dundi_answer_entity(), dundi_answer_query(), dundi_flush(), dundi_lookup_thread(), dundi_precache_thread(), dundi_prop_precache(), dundi_query_thread(), dundi_send(), duplicate_pseudo(), dynamic_dtmf_hook_add(), eivr_comm(), empty_columns(), endelm(), endpoint_destructor(), endpoint_internal_create(), endpoints_scrape_cb(), enum_query_read(), erds_destroy(), evaluate_history_entry(), eventlist_destructor(), ewscal_write_event(), exception_store_free(), exchangecal_get_events_between(), exchangecal_request(), exchangecal_write_event(), exec_exec(), execute_and_consume(), expression_token_free(), exten_state_data_destructor(), exten_state_pub_data_destroy(), exten_state_publisher_cb(), exten_state_subscription_destructor(), fax_session_new(), featuregroup_destructor(), festival_exec(), fetch_access_token(), fetch_google_access_token(), fetch_icalendar(), fetch_response_reader(), filehelper(), filestream_destructor(), filter_history(), find_and_retrans(), find_aor(), find_cache(), find_conf_realtime(), find_idle_thread(), find_realtime(), find_registrar_aor(), find_table(), find_user(), find_user_realtime(), findmeexec(), fixed_jb_destroy(), format_ami_aor_handler(), format_ami_aorlist_handler(), format_ami_auth_handler(), format_ami_authlist_handler(), format_ami_contactlist_handler(), format_ami_endpoint(), format_ami_endpoint_transport(), format_ami_endpoints(), format_ami_resource_lists(), format_str_append_auth(), frame_cache_cleanup(), frame_drop_helper(), frame_set_var(), framehook_detach(), free_acf_query(), free_agi_cmd(), free_body_parts(), free_chanvar(), free_config(), free_context(), free_convolve_channel(), free_convolve_data(), free_external_channelvars(), free_numbers(), free_outgoing(), free_robin_list(), free_signaling_queue_entry(), free_strings(), free_table(), free_user(), free_via(), free_zone(), func_channel_write_real(), func_confbridge_data_destructor(), function_db_keys(), function_sippeer(), gen_release(), generate_status(), generic_http_callback(), generic_monitor_instance_list_destructor(), get_chan_by_ast_name(), get_destination(), get_ewscal_ids_for(), get_ipaddress(), get_languages(), get_local_address(), get_lock(), get_media_encryption_type(), get_name_from_resource(), get_pai(), get_rdnis(), get_robin_position(), get_single_field_as_var_list(), global_loaded(), gosub_free(), gosub_release_frame(), h263_destroy(), h264_destroy(), handle_aor(), handle_call_forward(), handle_cc_status(), handle_cli_agi_show(), handle_cli_dialplan_remove_extension(), handle_cli_sched_bench(), handle_cli_test_locales(), handle_cli_udptl_set_debug(), handle_command_response(), handle_commandmatchesarray(), handle_dbget(), handle_debug_or_trace(), handle_deferred_full_frames(), handle_getvariablefull(), handle_gosub(), handle_hint_change_message_type(), handle_incoming_sdp(), handle_init_event(), handle_manager_show_events(), handle_missing_table(), handle_options(), handle_recvtext(), handle_registrations(), handle_remb_set(), handle_request_subscribe(), handle_response(), handle_response_subscribe(), handle_scan_file(), handle_show_function(), handle_show_locks(), handle_show_threads(), handle_show_translation_table(), handle_showchan(), handle_showmancmd(), handle_updates(), hangupcause_keys_read(), hep_queue_cb(), holding_bridge_join(), holding_bridge_leave(), hook_datastore_destroy_callback(), hook_destroy(), hook_destroy_cb(), hook_thread_arg_destroy(), host_candidate_overrides_clear(), ht_delete(), http_callback(), iax2_append_register(), iax2_free_variable_datastore(), iax2_process_thread_cleanup(), iax2_setoption(), iax_frame_free(), iax_frame_new(), iax_parse_ies(), iax_provision_free_templates(), icalendar_add_event(), idle_sched_cb(), idle_sched_cleanup(), ignorepat_free(), ilbc_destroy(), inclfile_destroy(), include_free(), incoming_in_dialog_request(), indicate_data_destroy(), init_convolve_channel(), init_convolve_data(), init_logger_chain(), init_queue(), init_req(), init_resp(), initial_notify_task(), initreqprep(), insert_penaltychange(), internal_sip_session_media_state_alloc(), internal_state_destroy(), internal_type_destroy(), io_context_create(), io_context_destroy(), ip_identify_match_host_lookup(), is_valid_uuid(), jack_str(), jb_destroy(), jb_framedata_destroy(), join_conference_bridge(), keypad_cfg_read(), launch_monitor_thread(), launch_netscript(), ldap_loadentry(), leave_conference(), leave_queue(), leave_voicemail(), linear_alloc(), linear_release(), list_item_handler(), list_item_to_str(), load_channelvars(), load_column_config(), load_config(), load_dlopen(), load_module(), load_modules(), load_resource_list(), load_values_config(), load_zonemessages(), loader_config_init(), local_ast_moh_cleanup(), local_message_to_ami(), localnet_to_str(), lock_free(), lock_info_destroy(), log_action(), log_attended_transfer(), logmsg_free(), lpc10_destroy(), lua_free_extensions(), lua_read_extensions_file(), lua_reload_extensions(), main(), make_email_file(), make_logchannel(), manager_bridge_info(), manager_bridge_tech_list(), manager_bridges_list(), manager_build_parked_call_string(), manager_fax_sessions_entry(), manager_free_user(), manager_generic_msg_cb(), manager_park_bridged(), manager_parking_status_all_lots(), manager_parking_status_single_lot(), manager_set_defaults(), manager_shutdown(), match_to_str(), matrix_resize(), max_forwards_destroy(), mbl_load_adapter(), mbl_load_device(), mbl_sendsms_exec(), media_cache_item_del_from_astdb(), meetme_cmd_helper(), meetme_show_cmd(), meetme_stasis_cb(), menu_destructor(), menu_hook_destroy(), message_template_build(), message_template_free(), message_type_dtor(), mgcp_postrequest(), mgcp_prune_realtime_gateway(), mgcpsock_read(), milliwatt_release(), misdn_cfg_destroy(), misdn_cfg_get_config_string(), misdn_jb_destroy(), misdn_jb_init(), mixmonitor_ds_destroy(), mixmonitor_free(), mkif(), mkintf(), mock_channel_hangup(), mock_tcp_loop(), module_destroy(), module_load_error(), module_load_helper_on_file(), moh_class_destructor(), moh_file_vector_destructor(), moh_release(), mohalloc(), monitor_pfds_clean(), monitored_transport_state_callback(), msg_data_destroy(), msg_queue_free_and_pop(), msg_send(), multi_object_blob_to_ami(), multi_user_event_to_ami(), multicast_rtp_destroy(), multicast_rtp_new(), music_disable(), mwi_allocate_body(), mwi_app_event_cb(), mwi_destroy_body(), mwi_mailbox_delete(), mwi_mailbox_get(), mwi_send_init(), mwi_send_process_buffer(), mwi_send_process_event(), mwi_subscription_destructor(), mwi_thread(), mwi_update_cb(), my_callwait(), my_cancel_cidspill(), my_load_config_string(), my_load_module(), my_send_callerid(), my_unload_module(), mysql_ds_destroy(), mysql_ds_fixup(), named_callgroups_to_str(), named_pickupgroups_to_str(), native_bridge_destroy(), native_bridge_leave(), native_rtp_bridge_channel_data_free(), nbs_alloc(), nbs_destroy(), negotiate_incoming_sdp_stream(), new_outgoing(), newpvt(), notify_ami_uri_data_destroy(), notify_cli_uri_data_destroy(), notify_task_data_destructor(), odbc_class_destructor(), odbc_datastore_free(), odbc_load_module(), odbc_log(), odbc_txn_free(), offered_media_list_destroy(), on_moh_file(), ooh323_alloc(), ooh323_answer(), ooh323_call(), ooh323_delete_peer(), ooh323_destroy(), ooh323_indicate(), ooh323_set_rtp_peer(), ooh323c_call_thread(), ooh323c_start_call_thread(), optional_api_create(), optional_api_destroy(), opus_destroy(), osp_create_provider(), osp_unload(), page_exec(), park_announce_subscription_data_destroy(), park_application_setup(), park_common_datastore_free(), parked_call_message_response(), parked_subscription_datastore_destroy(), parker_update_cb(), parking_lot_cfg_create_extensions(), parse_cdata(), parse_ewscal_id(), parse_register_contact(), path_lock_destroy(), pbx_destroy(), pbx_load_config(), pbx_outgoing_destroy(), pbx_retrieve_variable(), pbx_set_overrideswitch(), peerstatus_to_ami(), pgsql_log(), pgsql_reconnect(), pktccops_unregister_cmtses(), pktccops_unregister_ippools(), play_failsound(), playback_dtor(), playtones_release(), plc_ds_destroy(), policy_destructor(), populate_addr(), populate_defaults(), populate_list(), pp_each_extension_helper(), predial_disable(), presence_read(), presence_state_cb(), presence_state_notify_callbacks(), presence_state_to_ami(), print_app_docs(), print_event_instance(), print_named_groups(), process_category(), process_description_file(), process_media_file(), process_my_load_module(), process_precache(), profile_destructor(), prometheus_metric_free(), prometheus_show_metrics(), protocol_destroy_fn(), publication_resource_destroy(), publish_basic_channel_event(), publish_channel_alarm(), publish_channel_alarm_clear(), publish_dnd_state(), pubsub_on_rx_subscribe_request(), purge_events(), queue_channel_to_ami(), queue_created_files(), queue_file_write(), queue_member_to_ami(), queue_multi_channel_to_ami(), queue_read_action_payload(), queue_reload_request(), queue_sendtext_data(), queued_set_size(), queued_task_pushed(), rcv_mac_addr(), read_config(), read_raw_content_length(), realtime_ldap(), realtime_ldap_base_ap(), realtime_ldap_result_to_vars(), realtime_ldap_status(), realtime_multi_curl(), realtime_multi_handler(), realtime_multi_ldap(), realtime_multi_pgsql(), realtime_peer(), realtime_peer_by_name(), realtime_pgsql(), realtime_sqlite3_destroy(), realtime_sqlite3_helper(), realtime_sqlite3_store(), realtime_sqlite3_update(), realtime_sqlite3_update2(), realtime_user(), recording_dtor(), refer_progress_destroy(), register_aor_core(), register_translator(), register_verify(), registration_deleted_observer(), registration_loaded_observer(), registry_message_cb(), release_doomed_pris(), release_jb_frame(), release_transaction(), reload_config(), reload_queue_members(), reload_queue_rules(), remb_values_free(), remove_attended_transfer_stimulus(), remove_bridge_playback(), remove_excess_lws(), remove_from_queue(), remove_hintdevice(), remove_stream_from_bundle(), replace(), replace_channel_destroy(), require_pgsql(), res_sdp_crypto_build_offer(), res_sdp_crypto_dtor(), res_srtp_new(), reset_tone_zone(), resolve_first(), resource_endpoint_handler(), resource_list_destructor(), response_free(), retrans_pkt(), rm_file(), rtcp_report_to_ami(), rtp_ioqueue_thread_destroy(), rtp_raw_write(), rtp_rtcp_report_dtor(), run_app_helper(), run_station(), safe_vector_cleanup(), save_response_fields_to_transport(), say_character_str_full(), say_digit_str_full(), say_money_str_full(), say_phonetic_str_full(), sayfile_exec(), scan_thread(), sched_free(), sched_thread_destroy(), schtd_dtor(), secure_call_store_destroy(), security_event_to_ami_blob(), send_bridge_info_item_cb(), send_bridge_list_item_cb(), send_callerid(), send_eivr_event(), send_identify_ami_event(), send_message(), send_request(), send_unsolicited_mwi_notify_to_contact(), sendmail(), sendpage(), sendtext_data_destroy(), sendtext_exec(), sendtext_safe(), session_datastore_destroy(), session_destroy_fn(), session_destructor(), session_instance_destructor(), session_media_dtor(), session_refresh_state_destroy(), session_timeout_to_ami(), set_dial_masquerade(), set_hold_intercept(), set_id_from_hdr(), set_mid_and_bundle_group(), set_outbound_authentication_credentials(), set_outbound_initial_authentication_credentials(), set_redirecting_reason(), set_redirecting_reason_by_cause(), set_redirecting_value(), set_remote_mslabel_and_stream_group(), set_talk_detect(), set_var(), set_var_to_str(), setup_bridge_role_option(), setup_mixmonitor_ds(), setup_sdes_srtp(), setup_stunaddr(), shared_variable_free(), shared_write(), shaun_of_the_dead(), silk_destroy(), simple_task_data_free(), sip_aor_to_ami(), sip_cc_agent_destructor(), sip_epa_unregister_all(), sip_options_contact_update_task(), sip_outbound_publish_callback(), sip_outbound_publish_datastore_destroy(), sip_outbound_publisher_destroy(), sip_outbound_registration_client_state_destroy(), sip_outbound_registration_perform(), sip_pkt_dtor(), sip_publisher_service_queue(), sip_pvt_dtor(), sip_refer_destroy(), sip_route_clear(), sip_rtp_read(), sip_scheddestroy_full(), sip_show_channel(), sip_tcptls_client_args_destructor(), skinny_device_alloc(), skinny_device_destroy(), skinny_hangup(), skinny_line_alloc(), skinny_line_destroy(), skinny_reload(), skinny_session(), sla_event_destroy(), sla_failed_station_destroy(), sla_ringing_station_destroy(), sla_ringing_trunk_destroy(), smdi_msg_datastore_destroy(), snoop_destroy(), socket_process_helper(), socket_receive_file_to_buff(), softmix_bridge_data_destroy(), softmix_bridge_join(), softmix_bridge_leave(), softmix_mixing_array_destroy(), softmix_translate_helper_free_entry(), sorcery_astdb_close(), sorcery_config_destructor(), sorcery_config_open(), sorcery_memory_cache_destructor(), sorcery_memory_cache_open(), sorcery_memory_cache_thrash_create(), sorcery_memory_cache_thrash_destroy(), sorcery_object_destructor(), sorcery_object_field_destructor(), sorcery_object_type_destructor(), sorcery_realtime_close(), spandsp_fax_destroy(), spandsp_fax_new(), spandsp_manager_fax_session(), spandsp_v21_detect(), speech_processing_sound(), speex_callback(), speex_write(), split_ec(), split_path(), srds_destroy_cb(), srv_datastore_setup(), sstate_free(), stale_cache_update_task_data_destructor(), start_automixmonitor(), start_automonitor(), start_mwi_subscription(), start_network_thread(), start_reregister_timeout(), start_resource_list(), startelm(), stasis_app_bridge_playback_channel_add(), stasis_app_control_play_uri(), stasis_app_exec(), stasis_app_stored_recording_find_by_name(), stasis_caching_topic_create(), stasis_config_destructor(), stasis_cp_all_create(), stasis_message_sink_dtor(), stasis_topic_pool_get_topic(), state_alloc(), static_realtime_cb(), statsmaker(), stir_shaken_datastore_free(), stir_shaken_incoming_request(), stir_shaken_sign(), stir_shaken_verify_signature(), store_config(), store_mixer(), store_odbc(), stream_failsound(), stun_stop_monitor(), sub_persistence_recreate(), subscription_configuration_destroy(), subscription_dtor(), subscription_persistence_destroy(), subsystem_alert_decrement(), subsystem_alert_increment(), subsystem_copy(), sw_free(), system_registry_to_ami(), t38_state_destroy(), table_config_new(), table_configs_free(), talking_start_to_ami(), talking_stop_to_ami(), tcptls_packet_destructor(), tdd_feed(), tdd_free(), tds_log(), tds_unload_module(), temp_pvt_cleanup(), temp_state_store_cleanup(), test_2way_function(), test_bridging_chan_hangup(), test_cb_data_alloc(), test_cb_data_destroy(), test_cel_peer_strings_match(), test_chan_function(), test_chan_integer(), test_chan_integer_accessor(), test_chan_string(), test_chan_variable(), test_cli_generate_results(), test_core_format_destroy(), test_expected_result(), test_files_create(), test_free(), test_resource_tree_destroy(), test_suite_event_to_ami(), test_vm_api_create_mock_snapshot(), test_vm_api_destroy_mock_snapshot(), test_xml_entry(), thread_worker_pair_free(), threadpool_alloc(), threadpool_tps_task_pushed(), threadstorage_init(), timezone_add(), timing_read(), tls_method_to_str(), tonepair_release(), topology_change_refresh_data_free(), tps_shutdown(), tps_task_free(), transfer_data_destroy(), translate_shutdown(), transmit_response_bysession(), transport_info_destroy(), tree_node_alloc(), tree_node_destroy(), try_calling(), tryexec_exec(), unistim_free_sub(), unistim_line_alloc(), unistim_line_destroy(), unistim_new(), unload_config(), unload_module(), unregister_translators(), update2_ldap(), update_caldav(), update_ewscal(), update_exchangecal(), update_peer(), uri_parse_and_default(), user_dtor(), ustmtext(), varset_to_ami(), verb_console_free(), vm_allocate_dh(), vm_change_password(), vm_mailbox_snapshot_create(), vm_mailbox_snapshot_destroy(), vm_msg_snapshot_alloc(), vm_msg_snapshot_destroy(), vm_test_destroy_user(), vmaccounts_destroy_list(), voicemail_extension_handler(), vp8_destroy(), wait_for_answer(), wait_for_digits(), wait_for_stimulus(), websocket_client_args_create(), websocket_client_args_destroy(), websocket_client_destroy(), wizard_apply_handler(), wizard_mapped_observer(), write_cel(), write_history(), write_htmldump(), write_openssl_error_to_log(), xmldoc_build_documentation_item(), xmldoc_get_syntax_cmd(), xmldoc_get_syntax_config_object(), xmldoc_get_syntax_config_option(), xmldoc_get_syntax_fun(), xmldoc_get_syntax_manager(), xmldoc_parse_cmd_enumlist(), xmldoc_parse_enum(), xmldoc_parse_example(), xmldoc_parse_info(), xmldoc_parse_option(), xmldoc_parse_optionlist(), xmldoc_parse_para(), xmldoc_parse_parameter(), xmldoc_parse_variable(), xmldoc_parse_variablelist(), xmldoc_reverse_helper(), xmldoc_string_wrap(), xmldoc_unload_documentation(), xmpp_client_requested_tls(), xmpp_message_destroy(), xmpp_pak_presence(), and xmpp_resource_destructor().

◆ ast_malloc

#define ast_malloc (   len)    __ast_malloc((len), __FILE__, __LINE__, __PRETTY_FUNCTION__)

A wrapper for malloc()

ast_malloc() is a wrapper for malloc() that will generate an Asterisk log message in the case that the allocation fails.

The argument and return value are the same as malloc()

Examples:
/usr/src/asterisk-18.5.0/main/app.c.

Definition at line 193 of file astmm.h.

Referenced by __ast_file_read_dirs(), __ast_frisolate(), _parse(), action_command(), add_identifier(), add_identity_header(), add_vm_recipients_from_string(), append_event(), ari_bridges_play_new(), assign_uuid(), ast_app_run_macro(), ast_app_run_sub(), ast_ari_applications_subscribe_cb(), ast_ari_applications_subscribe_parse_body(), ast_ari_applications_unsubscribe_cb(), ast_ari_applications_unsubscribe_parse_body(), ast_ari_asterisk_get_info_cb(), ast_ari_asterisk_get_info_parse_body(), ast_ari_bridges_add_channel_cb(), ast_ari_bridges_add_channel_parse_body(), ast_ari_bridges_play_cb(), ast_ari_bridges_play_parse_body(), ast_ari_bridges_play_with_id_cb(), ast_ari_bridges_play_with_id_parse_body(), ast_ari_bridges_record(), ast_ari_bridges_remove_channel_cb(), ast_ari_bridges_remove_channel_parse_body(), ast_ari_channels_play_cb(), ast_ari_channels_play_parse_body(), ast_ari_channels_play_with_id_cb(), ast_ari_channels_play_with_id_parse_body(), ast_ari_channels_record(), ast_ari_events_event_websocket_ws_attempted_cb(), ast_ari_events_event_websocket_ws_established_cb(), ast_ari_events_user_event_cb(), ast_ari_events_user_event_parse_body(), ast_audiosocket_receive_frame(), ast_base64decode_string(), ast_base64url_decode_string(), ast_base64url_encode_string(), ast_bridge_features_new(), ast_cel_fabricate_channel_from_event(), ast_child_verbose(), ast_connected_line_parse_data(), ast_dns_txt_get_strings(), ast_eid_to_str(), ast_event_new(), ast_http_get_contents(), ast_io_add(), ast_iostream_printf(), ast_json_malloc(), ast_loader_register(), ast_msg_data_dup(), ast_pbx_hangup_handler_push(), ast_pthread_create_stack(), ast_read_textfile(), ast_redirecting_parse_data(), ast_rtp_read(), ast_say_number_full_ka(), ast_say_number_full_pl(), ast_serializer_pool_create(), ast_set_default_eid(), ast_sip_for_each_contact(), ast_sockaddr_resolve(), ast_str_to_uuid(), AST_TEST_DEFINE(), ast_uri_make_host_with_port(), ast_utf8_validator_new(), ast_uuid_copy(), ast_uuid_generate(), ast_writefile(), ast_xmldoc_load_documentation(), async_datastore_data_alloc(), async_delete_name_rec_task_data_alloc(), async_playback_task_data_alloc(), bridge_features_ds_set_full(), build_regex(), CB_INIT(), cli_complete_subscription_common(), cli_gather_contact(), complete_queue_add_member(), confbridge_exec(), config_odbc(), consumer_create(), contact_observer_updated(), control_dial_args_alloc(), cops_gate_cmd(), cops_getmsg(), cops_sendmsg(), cpg_deliver_cb(), curl_write_string_callback(), dahdi_callwait(), dahdi_sendtext(), db_gettree_common(), destroy_trans(), dictate_exec(), do_pktccops(), duplicate_pseudo(), dynamic_dtmf_hook_add(), escape_alloc(), expand_gosub_args(), fetch_response_reader(), filter_history(), format_numeric_domain(), frame_drop_helper(), frame_set_var(), generate_filenames_string(), get_local_address(), get_outbound_endpoint(), get_user_agent(), goto_parser(), handle_atsign(), handle_cc_status(), handle_cli_agi_show(), handle_cli_sched_bench(), handle_commandmatchesarray(), handle_show_function(), handle_show_hint(), handle_single_token(), handle_slash(), hep_queue_cb(), hepv3_create_capture_info(), ht_new(), iax2_setoption(), ident_to_str(), ilbc_clone(), incoming_in_dialog_request(), indicate_data_alloc(), init_batch(), init_convolve_data(), insert_user_in_contact_uri(), io_context_create(), load_module(), load_zonemessages(), lua_read_extensions_file(), max_forwards_alloc(), mgcp_postrequest(), mwi_allocate_body(), my_callwait(), my_send_callerid(), opus_clone(), pgsql_log(), process_sdp(), pubsub_on_rx_subscribe_request(), queue_put(), queue_read_action_payload(), queue_signalling(), rcv_mac_addr(), remove_excess_lws(), rtp_raw_write(), save_response_fields_to_transport(), send_cwcidspill(), send_request(), set_binaural_data_join(), set_redirecting_value(), set_size_data_alloc(), set_timeout(), shared_write(), silk_clone(), sip_route_add(), sip_scheddestroy_full(), socket_receive_file_to_buff(), spandsp_v21_detect(), start_mwi_subscription(), start_reregister_timeout(), stasis_app_control_play_uri(), stasis_message_sink_create(), sub_persistence_recreate(), subsystem_alert_increment(), subsystem_copy(), task_pushed_data_alloc(), thread_worker_pair_alloc(), uri_parse_and_default(), vm_allocate_dh(), vm_change_password(), vp8_clone(), websocket_client_create_key(), wizard_mapped_observer(), and write_history().

◆ ast_realloc

#define ast_realloc (   p,
  len 
)    __ast_realloc((p), (len), __FILE__, __LINE__, __PRETTY_FUNCTION__)

◆ ast_strdup

#define ast_strdup (   str)    __ast_strdup((str), __FILE__, __LINE__, __PRETTY_FUNCTION__)

A wrapper for strdup()

ast_strdup() is a wrapper for strdup() that will generate an Asterisk log message in the case that the allocation fails.

ast_strdup(), unlike strdup(), can safely accept a NULL argument. If a NULL argument is provided, ast_strdup will return NULL without generating any kind of error log message.

The argument and return value are the same as strdup()

Examples:
/usr/src/asterisk-18.5.0/main/app.c.

Definition at line 243 of file astmm.h.

Referenced by __after_bridge_set_goto(), __analog_handle_event(), __ast_channel_alloc_ap(), __ast_cli_register(), __ast_datastore_alloc(), __ast_frisolate(), __ast_http_load(), __ast_http_post_load(), __ast_sorcery_apply_config(), __init_manager(), _ast_xmldoc_build_arguments(), _ast_xmldoc_build_seealso(), _macro_exec(), _xmldoc_build_field(), acl_to_str(), actual_load_config(), add_agi_cmd(), add_cfg_entry(), add_extension(), add_hintdevice(), add_to_load_order(), add_to_regcontext(), agent_handle_logoff_cmd(), alloc_notify_task_data(), answer_exec_enable(), ao2_container_unregister(), app_control_move(), app_create(), app_set_replace_channel_app(), append_mailbox(), apply_option(), apply_options_full(), assign_uuid(), ast_add_profile(), ast_agi_register(), ast_ari_applications_subscribe_cb(), ast_ari_applications_unsubscribe_cb(), ast_ari_asterisk_get_info_cb(), ast_ari_bridges_add_channel_cb(), ast_ari_bridges_play_cb(), ast_ari_bridges_play_with_id_cb(), ast_ari_bridges_remove_channel_cb(), ast_ari_channels_play_cb(), ast_ari_channels_play_with_id_cb(), ast_ari_events_event_websocket_ws_attempted_cb(), ast_ari_events_event_websocket_ws_established_cb(), ast_ari_events_user_event_cb(), ast_bridge_timelimit(), ast_build_timing(), ast_cc_monitor_failed(), ast_cel_fabricate_channel_from_event(), ast_cli_complete(), ast_cli_perms_init(), ast_complete_applications(), ast_complete_channels(), ast_config_hook_register(), ast_context_find_or_create(), ast_crypt(), ast_crypt_validate(), ast_datastores_alloc_datastore(), ast_el_strtoarr(), ast_ext_ctx(), ast_get_chan_features_atxferabort(), ast_get_chan_features_xferfailsound(), ast_hint_presence_state(), ast_hook_send_action(), ast_iax2_new(), ast_include_new(), ast_include_rename(), ast_lock_path_flock(), ast_merge_contexts_and_delete(), ast_module_helper(), ast_monitor_start(), ast_odbc_execute_sql(), ast_odbc_prepare(), ast_party_dialed_copy(), ast_party_dialed_set(), ast_party_id_copy(), ast_party_id_set(), ast_party_name_copy(), ast_party_name_set(), ast_party_number_copy(), ast_party_number_set(), ast_party_redirecting_reason_copy(), ast_party_redirecting_reason_set(), ast_party_subaddress_copy(), ast_party_subaddress_set(), ast_readfile(), ast_register_indication(), ast_rtp_dtls_cfg_copy(), ast_rtp_dtls_cfg_parse(), ast_rtp_ice_add_cand(), ast_rtp_ice_add_remote_candidate(), ast_rtp_prop_set(), ast_rtp_remote_address_set(), ast_safe_mkdir(), ast_sendtext_data(), ast_set_callerid(), ast_sip_auth_vector_init(), ast_sip_endpoint_alloc(), ast_sip_for_each_contact(), ast_sip_get_debug(), ast_sip_get_default_voicemail_extension(), ast_sip_get_endpoint_identifier_order(), ast_sip_get_regcontext(), ast_sip_global_default_outbound_endpoint(), ast_sip_persistent_endpoint_update_state(), ast_sip_publish_client_alloc_datastore(), ast_sip_session_alloc_datastore(), ast_sip_session_media_state_add(), ast_sip_transport_state_set_preferred_identity(), ast_sorcery_alloc(), ast_stir_shaken_add_verification(), ast_stir_shaken_sign(), ast_stir_shaken_verify(), ast_streamfile(), ast_tcptls_server_start(), AST_TEST_DEFINE(), ast_tls_read_conf(), ast_to_camel_case_delim(), ast_variable_lists_match(), ast_vector_string_split(), ast_websocket_sub_protocol_alloc(), ast_writefile(), ast_xmldoc_load_documentation(), attestation_to_str(), auth_type_to_str(), authenticate_api_key(), authenticate_verify(), bool_handler_fn(), bucket_file_update_path(), build_calendar(), build_mapping(), build_peer(), ca_file_to_str(), ca_list_file_to_str(), ca_list_path_to_str(), ca_path_to_str(), cache_entry_create(), cache_test_message_create_full(), caldav_add_event(), calendar_write_exec(), caller_id_handler(), caller_id_incoming_request(), caller_id_privacy_to_str(), caller_id_tag_handler(), caller_id_tag_to_str(), callerid_write(), capture_buildopts_cb(), category_complete(), cb_events(), cc_device_monitor_init(), cc_generic_monitor_request_cc(), cert_file_to_str(), chan_pjsip_new(), change_redirecting_information(), chararray_handler_fn(), check_regcontext(), check_user_full(), cli_complete_endpoint(), cli_complete_notify(), cli_complete_registration(), cli_complete_show(), cli_complete_uri(), cli_console_active(), cli_gather_contact(), cli_odbc_read(), cli_odbc_write(), codec_handler_fn(), codec_prefs_to_str(), complete_agent(), complete_agent_logoff(), complete_ari_app(), complete_ari_user(), complete_bridge_live_search(), complete_bridge_participant(), complete_bridge_profile_name(), complete_bridge_technology(), complete_channeltypes(), complete_confbridge_name(), complete_confbridge_participant(), complete_config_module(), complete_config_option(), complete_config_type(), complete_confno(), complete_core_id(), complete_core_show_hint(), complete_country(), complete_debug_port(), complete_dialplan_add_extension(), complete_dialplan_add_ignorepat(), complete_dialplan_add_include(), complete_dialplan_remove_context(), complete_dialplan_remove_extension(), complete_dialplan_remove_ignorepat(), complete_dialplan_remove_include(), complete_functions(), complete_iax2_peers(), complete_iax2_unregister(), complete_indications(), complete_meetmecmd_list(), complete_meetmecmd_mute_kick(), complete_menu_name(), complete_minivm_show_users(), complete_mohclass_realtime(), complete_number(), complete_parking_lot(), complete_peer_helper(), complete_queue(), complete_queue_add_member(), complete_queue_pause_member(), complete_queue_remove_member(), complete_queue_rule_show(), complete_queue_set_member_value(), complete_show_config(), complete_show_dialplan_context(), complete_show_sorcery_object(), complete_sip_notify(), complete_sip_peer(), complete_sip_registered_peer(), complete_sip_user(), complete_sipch(), complete_skinny_debug(), complete_skinny_devices(), complete_skinny_show_line(), complete_test_category(), complete_test_name(), complete_trans_path_choice(), complete_ulimit(), complete_user_profile_name(), complete_userno(), complete_voicemail_show_users(), conf_run(), config_module(), connected_line_method_to_str(), contact_acl_to_str(), contact_user_handler(), contact_user_to_str(), contacts_to_str(), context_merge(), create_artificial_endpoint(), create_new_generic_list(), crypto_get_attrib(), curl_header_callback(), custom_presence_callback(), dahdi_handle_event(), dahdi_new(), db_get_common(), device_state_cb(), dial_append_common(), dial_exec_full(), direct_media_glare_mitigation_to_str(), direct_media_method_to_str(), do_forward(), do_message(), do_say(), dtlsautogeneratecert_to_str(), dtlscafile_to_str(), dtlscapath_to_str(), dtlscertfile_to_str(), dtlscipher_to_str(), dtlsfingerprint_to_str(), dtlsprivatekey_to_str(), dtlssetup_to_str(), dtlsverify_to_str(), dtmf_to_str(), dtmfstore_exec(), dummy_start(), endelm(), enum_callback(), exten_state_pub_data_alloc(), extension_state_add_destroy(), fax_session_new(), fax_session_tab_complete(), featuregroup_alloc(), fetch_google_access_token(), find_aor_name(), find_conf_realtime(), find_or_create_temporary_state(), find_user(), from_user_to_str(), generate_filenames_string(), generate_parked_user(), get_destination(), get_name_and_number(), get_outbound_endpoint(), get_park_common_datastore_copy(), get_path_to_public_key(), get_rdnis(), get_robin_position(), handle_atsign(), handle_call_forward(), handle_cli_config_reload(), handle_cli_dialplan_add_extension(), handle_cli_odbc_show(), handle_cli_realtime_mysql_cache(), handle_cli_realtime_mysql_status(), handle_cli_realtime_pgsql_cache(), handle_cli_rtp_drop_incoming_packets(), handle_cli_sound_show(), handle_debug(), handle_debug_category(), handle_local_optimization_begin(), handle_logger_remove_channel(), handle_manager_show_event(), handle_show_calendar(), handle_show_named_acl_cmd(), handle_showmanager(), handle_showmancmd(), handle_single_token(), handle_slash(), handle_trace(), handle_updates(), handle_verbose(), hook_state_alloc(), hook_thread_arg_alloc(), iax_prov_complete_template(), icalendar_add_event(), incoming_call_offer_pref_to_str(), init_acf_query(), init_logger_chain(), internal_extension_state_extended(), internal_state_alloc(), is_prefix(), jack_str(), launch_monitor_thread(), list_item_handler(), list_item_to_str(), load_channelvars(), load_column_config(), load_config(), load_odbc_config(), load_values_config(), localnet_to_str(), logger_register_level(), main(), manager_dialplan_extension_add(), manager_set_defaults(), match_to_str(), mbl_sendsms_exec(), media_encryption_to_str(), meetme_menu_admin_extended(), message_template_parse_emailbody(), mgcp_new(), mgcp_ss(), misdn_call(), misdn_new(), module_load_error(), module_load_helper_on_file(), moh_parse_options(), monitored_transport_state_callback(), msg_data_create(), music_enable(), mwi_subscription_alloc(), named_callgroups_to_str(), named_pickupgroups_to_str(), new_category(), notify_ami_uri_data_create(), notify_cli_uri_data_create(), odbc_load_module(), ooh323_alloc(), ooh323_answer(), ooh323_call(), ooh323_indicate(), ooh323_onReceivedSetup(), ooh323_request(), ooh323_set_rtp_peer(), oss_new(), outgoing_call_offer_pref_to_str(), overload_trigger_to_str(), park_announce_subscription_data_create(), park_app_parse_data(), parked_user_set_parker_dial_string(), parking_add_extension(), parking_duration_callback(), parse_args(), parse_config(), parse_moved_contact(), parse_via(), party_id_write(), party_name_write(), party_number_write(), party_subaddress_write(), path_to_str(), pbx_load_config(), pbx_load_users(), pbx_outgoing_attempt(), pbx_set_overrideswitch(), persistence_endpoint_str2struct(), persistence_endpoint_struct2str(), persistence_generator_data_struct2str(), persistence_tag_str2struct(), persistence_tag_struct2str(), phone_new(), populate_list(), prack_to_str(), predial_enable(), presence_state_cached(), presence_state_notify_callbacks(), privkey_file_to_str(), process_description_file(), process_my_load_module(), public_cert_url_to_str(), realtime_ldap_result_to_vars(), realtime_multi_curl(), realtime_multi_handler(), refer_blind_callback(), register_exten(), register_peer_exten(), register_verify(), reload_config(), require_client_cert_to_str(), resource_endpoint_handler(), ring_entry(), save_dialstring(), set_dial_masquerade(), set_fn(), set_full_cmd(), set_id_from_hdr(), set_redirecting_reason(), set_redirecting_reason_by_cause(), set_remote_mslabel_and_stream_group(), set_touch_variable(), set_var(), set_var_to_str(), setup_mixmonitor_ds(), setup_park_common_datastore(), setup_stunaddr(), sip_new(), sip_outbound_publisher_set_uris(), sip_outbound_registration_perform(), sip_outbound_registration_state_alloc(), sip_prepare_socket(), skinny_new(), skinny_newcall(), sla_build_station(), sla_build_trunk(), sockaddr_handler_fn(), sorcery_astdb_open(), sorcery_config_open(), sorcery_memory_cache_complete_name(), sorcery_memory_cache_complete_object_name(), sorcery_memory_cache_load(), sorcery_memory_cache_open(), spawn_dp_lookup(), speech_background(), speech_processing_sound(), speex_callback(), split_ec(), split_path(), stale_cache_update_task_data_alloc(), stasis_app_bridge_playback_channel_add(), stasis_app_control_add_role(), stasis_app_control_moh_start(), stasis_app_control_redirect(), stasis_app_control_set_channel_var(), stasis_message_type_create(), static_realtime_cb(), stir_shaken_get_serial_number_x509(), stir_shaken_tab_complete_name(), stir_shaken_verify_json(), store_config(), store_mixer(), stringfield_handler_fn(), subscription_persistence_create(), subscription_statistics_complete_name(), t38udptl_ec_to_str(), table_config_new(), test_cel_peer_strings_match(), timers_to_str(), tls_method_to_str(), topic_complete_name(), topic_statistics_complete_name(), tps_taskprocessor_tab_complete(), transfer_data_alloc(), transport_protocol_to_str(), unistim_new(), update_connectedline(), user_alloc(), ustmtext(), verify_client_to_str(), verify_server_to_str(), vm_allocate_dh(), voicemail_extension_handler(), voicemail_extension_to_str(), wait_for_answer(), wait_for_digits(), websocket_client_create(), websocket_client_handshake_get_response(), wizard_apply_handler(), write_htmldump(), xmldoc_get_syntax_cmd(), xmldoc_get_syntax_config_object(), xmldoc_get_syntax_config_option(), xmldoc_get_syntax_fun(), xmldoc_get_syntax_manager(), xmldoc_parse_cmd_enumlist(), xmldoc_string_wrap(), xmpp_pak_message(), xmpp_pak_presence(), and yesno_handler_fn().

◆ ast_strdupa

#define ast_strdupa (   s)

duplicate a string in memory from the stack

Parameters
sThe string to duplicate

This macro will duplicate the given string. It returns a pointer to the stack allocatted memory for the new string.

Examples:
/usr/src/asterisk-18.5.0/include/asterisk/strings.h, and /usr/src/asterisk-18.5.0/main/app.c.

Definition at line 300 of file astmm.h.

Referenced by __analog_ss_thread(), __ast_channel_alloc_ap(), __ast_play_and_record(), __dahdi_exception(), __has_voicemail(), __ssl_setup_certs(), _ast_device_state(), _build_port_config(), _iax2_show_peers_one(), _if_exec(), _macro_exec(), _parse(), _sip_show_peers_one(), _while_exec(), acf_curl_write(), acf_isexten_exec(), acf_jabberreceive_read(), acf_meetme_info(), acf_odbc_write(), acf_vm_info(), aco_process_var(), action_bridge(), action_dialplan_exec(), action_messagesend(), action_playback(), action_playback_and_continue(), action_status(), actual_load_config(), add_extension(), add_menu_entry(), add_peer_mailboxes(), add_realm_authentication(), add_redirect(), add_transferer_role(), add_var(), add_vm_recipients_from_string(), admin_exec(), advanced_options(), aelsub_exec(), agent_alert(), agent_function_read(), agent_login_channel_config(), agent_login_exec(), agent_request_exec(), agi_exec_full(), agi_handle_command(), ami_sip_qualify(), aMYSQL_clear(), aMYSQL_connect(), aMYSQL_disconnect(), aMYSQL_fetch(), aMYSQL_nextresult(), aMYSQL_query(), aMYSQL_set(), analog_exception(), analog_ss_thread(), answer_exec_enable(), app_exec(), append_ha_core(), append_mailbox(), append_mailbox_mapping(), append_var_and_value_to_filter(), applicationmap_handler(), apply_options(), apps_handler(), aqm_exec(), ari_channels_handle_originate_with_id(), array(), ast_app_getdata(), ast_append_acl(), ast_ari_channels_create(), ast_ari_channels_dial(), ast_ari_channels_external_media(), ast_ari_channels_redirect(), ast_ari_endpoints_send_message_to_endpoint(), ast_ari_invoke(), ast_bridge_channel_playfile(), ast_bridge_set_after_go_on(), ast_bridge_setup_after_goto(), ast_bridge_timelimit(), ast_bridge_transfer_attended(), ast_bucket_alloc(), ast_bucket_file_alloc(), ast_build_timing(), ast_callerid_split(), ast_cdr_setvar(), ast_channel_connected_line_macro(), ast_channel_connected_line_sub(), ast_channel_redirecting_macro(), ast_channel_redirecting_sub(), ast_channel_yank(), ast_config_hook_unregister(), ast_control_tone(), ast_dial_append_channel(), ast_dns_test_write_domain(), ast_do_pickup(), ast_eivr_senddtmf(), ast_eivr_setvariable(), ast_el_add_history(), ast_format_cap_update_by_allow_disallow(), ast_format_str_reduce(), ast_func_read(), ast_func_read2(), ast_func_write(), ast_get_chan_applicationmap(), ast_get_group(), ast_get_namedgroups(), ast_iax2_new(), ast_media_cache_create_or_update(), ast_mkdir(), ast_monitor_change_fname(), ast_monitor_start(), ast_msg_send(), ast_multi_channel_blob_get_channels(), ast_ouraddrfor(), ast_parse_arg(), ast_pickup_call(), ast_playtones_start(), ast_presence_state_helper(), ast_rtp_engine_load_format(), ast_sip_auth_vector_init(), ast_sip_for_each_aor(), ast_sip_location_retrieve_contact_and_aor_from_list_filtered(), ast_sip_sanitize_xml(), ast_sip_validate_uri_length(), ast_sockaddr_parse(), ast_sockaddr_resolve(), ast_str_retrieve_variable(), ast_stream_codec_prefs_parse(), ast_strings_match(), AST_TEST_DEFINE(), ast_utils_which(), ast_variables_match(), ast_vector_string_split(), ast_websocket_uri_cb(), asterisk_publication_mailboxstate(), astman_send_error_va(), asyncgoto_exec(), attended_transfer_bridge(), attended_transfer_exec(), attended_transfer_properties_alloc(), audiosocket_exec(), audiosocket_request(), auth_exec(), authenticate_reply(), authenticate_verify(), background_detect_exec(), blind_transfer_exec(), bridge_agent_hold_push(), bridge_channel_control_thread(), bridge_check_monitor(), bridge_create_common(), bridge_exec(), bridge_parking_push(), bridgeadd_exec(), bridgewait_exec(), bucket_file_wizard_retrieve(), bucket_wizard_retrieve(), build_channels(), build_contact(), build_expression_queue(), build_mapping(), build_peer(), build_radius_record(), build_user(), cache_get_callno_locked(), callerid_read(), callerid_write(), cb_events(), cdr_object_get_by_name(), cdr_prop_write_callback(), cdr_read_callback(), cdr_write(), cdr_write_callback(), cel_track_app(), celgenuserevent_exec(), celt_parse_sdp_fmtp(), chanavail_exec(), change_callid_pvt(), channel_admin_exec(), channel_do_masquerade(), channel_read_pjsip(), channel_spy(), channelvars_handler(), chanspy_exec(), check_access(), check_blacklist(), check_bridge_play_sound(), check_day(), check_dow(), check_for_nat(), check_month(), check_nonce(), check_peer_ok(), check_switch_expr(), check_timerange(), check_user_full(), cli_channelstats_print_body(), cli_odbc_read(), cli_odbc_write(), cli_qualify(), cli_reload_qualify_endpoint(), cli_show_qualify_endpoint(), comeback_goto(), complete_meetmecmd_list(), complete_meetmecmd_mute_kick(), conf_exec(), conf_run(), conf_start_moh(), confbridge_exec(), confbridge_handle_atxfer(), config_function_read(), config_module(), confkick_exec(), connectedline_read(), connectedline_write(), console_transfer(), contact_alloc(), controlplayback_exec(), count_exec(), create_addr(), create_addr_from_peer(), create_dynamic_lot_full(), create_followme_number(), create_parked_subscription_full(), create_queue_member(), create_sound_blob(), create_unsolicited_mwi_subscriptions(), cut_internal(), dahdi_call(), dahdi_cc_callback(), dahdiras_exec(), dahdiscan_exec(), debug_ha_sense_appended(), decrypt_frame(), deltree_exec(), destroy_all_channels(), detect_write(), determine_starting_point(), device_state_cb(), dial_exec_full(), dial_trunk(), dialgroup_refreshdb(), dialgroup_write(), dialog_info_generate_body_content(), dictate_exec(), digest_create_request_with_auth(), directory_exec(), disa_exec(), dnsmgr_refresh(), do_immediate_setup(), do_notify(), do_say(), does_category_match(), dtls_handler(), dtmfstore_exec(), dundi_query_read(), dundi_result_read(), dundifunc_read(), dynamic_dtmf_hook_trip(), enum_query_read(), enum_result_read(), eval_exten_read(), events_handler(), ewscal_write_event(), exec_exec(), execif_exec(), execute_cb(), execute_state_callback(), expand_gosub_args(), extenspy_exec(), feature_automixmonitor(), feature_automonitor(), feature_blind_transfer(), festival_exec(), fileexists_core(), find_aor(), find_aor_for_resource(), find_aor_name(), find_body_generator_accept(), find_conf_realtime(), find_database(), find_generic_monitor_instance_list(), find_sdp(), find_table(), find_table_cb(), find_user(), forkcdr_exec(), forked_invite_init(), forward_message(), free_zone(), freq_parser(), func_confbridge_helper(), func_confbridge_info(), func_header_read(), func_headers_read2(), function_iaxpeer(), function_ooh323_write(), function_realtime_store(), generate_parked_user(), get_cid_name(), get_destination(), get_outbound_endpoint(), get_refer_info(), global_loaded(), gosub_exec(), gosub_run(), gosubif_exec(), goto_parser(), grab_transfer(), h263_parse_sdp_fmtp(), h264_parse_sdp_fmtp(), handle_call_forward(), handle_call_outgoing(), handle_cli_check_permissions(), handle_cli_dialplan_add_extension(), handle_cli_file_convert(), handle_cli_iax2_show_peer(), handle_cli_presencestate_change(), handle_common_options(), handle_debug_dialplan(), handle_debug_or_trace(), handle_gosub(), handle_mgcp_audit_endpoint(), handle_options(), handle_request_bye(), handle_request_invite(), handle_request_notify(), handle_request_refer(), handle_request_subscribe(), handle_response(), handle_show_dialplan(), handle_t38_options(), hangupcause_read(), hook_callback(), hook_on(), iax2_call(), iax2_devicestate(), iax2_prov_app(), iax2_request(), iconv_read(), ident_handler(), ilbc_parse_sdp_fmtp(), init_acf_query(), init_jack_data(), init_logger_chain(), insert_penaltychange(), insert_user_in_contact_uri(), ip_identify_apply(), ip_identify_match_handler(), is_empty(), is_prefix(), is_valid_dtmf(), is_writable(), isAnsweringMachine(), isexten_function_read(), ivr_dispatch(), jack_handler(), jb_helper(), jingle_request(), json_array_from_list(), launch_ha_netscript(), launch_monitor_thread(), launch_netscript(), leave_voicemail(), limits_interval_playback(), list_item_handler(), load_channelvars(), load_config(), load_dlopen(), local_alloc(), local_call(), local_devicestate(), localnet_to_vl_append(), log_exec(), lua_get_variable_value(), lua_pbx_exec(), lua_set_variable_value(), macroif_exec(), make_components(), make_email_file(), man_do_variable_value(), manager_dialplan_extension_add(), manager_dialplan_extension_remove(), manager_mixmonitor(), match_to_var_list_append(), mb_poll_thread(), mbl_call(), mbl_devicestate(), mbl_request(), mbl_sendsms_exec(), mbl_status_exec(), meetmemute(), message_received_handler(), messagecount(), metermaidstate(), mgcp_devicestate(), mgcp_ss(), minivm_accmess_exec(), minivm_account_func_read(), minivm_counter_func_read(), minivm_counter_func_write(), minivm_greet_exec(), minivm_mwi_exec(), minivm_notify_exec(), minivm_record_exec(), misdn_call(), misdn_check_l2l1(), misdn_facility_exec(), misdn_request(), misdn_set_opt_exec(), mixmonitor_exec(), moh_handle_digit(), monitor_dial(), msg_create_from_file(), msg_send(), msg_send_exec(), multicast_rtp_request(), mwi_contact_changed(), mwi_has_voicemail(), mwi_inboxcount(), mwi_on_aor(), mwi_to_event(), mwi_validate_for_aor(), my_connect_db(), my_on_hook(), mysql_log(), notify_endpoint(), notify_new_message(), odbc_log(), on_dns_update_mwi(), on_dns_update_peer(), on_dns_update_registry(), opus_parse_sdp_fmtp(), orig_app(), orig_exten(), origin_allowed(), originate_exec(), ospauth_exec(), ospfinished_exec(), osplookup_exec(), ospnext_exec(), oss_call(), oss_request(), page_exec(), park_and_announce_app_exec(), park_app_parse_data(), park_common_setup(), parked_call_app_exec(), parked_user_set_parker_dial_string(), parking_duration_callback(), parking_park_call(), parse_allowed_methods(), parse_cookies(), parse_empty_options(), parse_hint_device(), parse_hint_presence(), parse_register_contact(), parse_session_expires(), parse_simple_message_summary(), parse_sip_options(), parse_uri_full(), party_id_write(), party_name_write(), party_number_write(), pbx_builtin_answer(), pbx_builtin_background(), pbx_builtin_execiftime(), pbx_builtin_gotoif(), pbx_builtin_gotoiftime(), pbx_builtin_importvar(), pbx_builtin_pushvar_helper(), pbx_builtin_saycharacters_case(), pbx_builtin_setvar(), pbx_builtin_setvar_helper(), pbx_builtin_setvar_multiple(), pbx_builtin_waitdigit(), pbx_builtin_waitexten(), pbx_extension_helper(), pbx_find_extension(), pbx_parseable_goto(), pbx_retrieve_variable(), peer_set_srcaddr(), permanent_uri_handler(), pickup_exec(), pickupchan_exec(), pidf_allocate_body(), pjsip_acf_channel_read(), pjsip_acf_dial_contacts_read(), pjsip_aor_function_read(), pjsip_contact_function_read(), pjsip_endpoint_function_read(), play_files_helper(), play_message(), play_moh_exec(), playback_exec(), pqm_exec(), prep_email_sub_vars(), presence_read(), presence_write(), print_escaped_uri(), print_uri_debug(), privacy_exec(), process_echocancel(), process_sdp(), process_sdp_a_image(), process_sdp_o(), proxy_from_config(), publisher_start(), pubsub_on_rx_mwi_notify_request(), pvt_cause_cmp_fn(), pvt_cause_hash_fn(), ql_exec(), queue_exec(), queue_function_queuegetchannel(), queue_mwi_event(), queue_set_param(), qupd_exec(), rcvfax_exec(), read_exec(), read_mf_exec(), read_sf_exec(), readexten_exec(), realtime_common(), realtime_exec(), realtime_multi_ldap(), realtime_multi_mysql(), realtime_multi_odbc(), realtime_multi_pgsql(), realtime_peer(), realtime_update_peer(), realtime_user(), receive_message(), receivefax_exec(), record_exec(), redirecting_read(), redirecting_write(), register_verify(), registry_authrequest(), reload(), reload_config(), reload_single_member(), remove_trailing_slash(), report_receive_fax_status(), report_send_fax_status(), request(), res_sdp_crypto_parse_offer(), resetcdr_exec(), retrydial_exec(), rqm_exec(), rtcp_do_debug_ip(), rtp_add_candidates_to_ice(), rtp_do_debug_ip(), saycountedadj_exec(), saycountednoun_exec(), sayunixtime_exec(), scramble_write(), send_dial_tone(), send_unsolicited_mwi_notify(), senddtmf_exec(), sendfax_exec(), sendmail(), sendmf_exec(), sendurl_exec(), session_destructor(), set_bridge_peer_vars_multiparty(), set_hangup_source_and_cause(), set_redirecting_reason(), set_transfer_variables_all(), set_var_handler(), setup_mixmonitor(), setup_park_common_datastore(), setup_peer_after_bridge_goto(), setup_privacy_args(), setup_stunaddr(), silk_parse_sdp_fmtp(), sip_acf_channel_read(), sip_allow_anyrtp_remote(), sip_devicestate(), sip_get_cc_information(), sip_msg_send(), sip_new(), sip_options_synchronize_endpoint(), sip_parse_nat_option(), sip_queue_hangup_cause(), sip_send_mwi_to_peer(), sip_sendcustominfo(), sip_show_settings(), sip_sipredirect(), sip_uri_cmp(), sip_uri_headers_cmp(), sip_uri_params_cmp(), siren14_parse_sdp_fmtp(), siren7_parse_sdp_fmtp(), skel_exec(), skinny_devicestate(), sla_add_trunk_to_station(), sla_check_device(), sla_queue_event_conf(), sla_ring_station(), sla_state(), sla_station_exec(), sla_trunk_exec(), smdi_msg_read(), smdi_msg_retrieve_read(), sms_exec(), sndfax_exec(), socket_process_helper(), softhangup_exec(), sorcery_config_open(), sorcery_function_read(), sorcery_realtime_open(), sort_internal(), speech_background(), speech_load(), srv_result_read(), stackpeek_read(), start_automixmonitor(), start_automonitor(), start_moh_exec(), start_monitor_action(), start_monitor_exec(), state_notify_build_xml(), statsd_exec(), stir_shaken_read(), stop_mixmonitor_full(), stream_echo_exec(), stun_monitor_request(), talk_detect_fn_write(), test_xml_entry(), timezone_add(), tls_method_to_str(), transfer_exec(), transmit_invite(), try_calling(), try_suggested_sip_codec(), tryexec_exec(), type_in_list(), uac_sips_contact(), uas_sips_contact(), unicast_rtp_request(), unload_dynamic_module(), update_content_type(), update_registry(), upqm_exec(), user_event_hook_cb(), userevent_exec(), valid_priv_reply(), verbose_exec(), vm_allocate_dh(), vm_check_password_shell(), vm_exec(), vm_execmain(), vm_playmsgexec(), vm_sayname(), vmauthenticate(), vmsayname_exec(), vp8_parse_sdp_fmtp(), wait_exec(), wait_for_answer(), wait_for_winner(), waitfor_exec(), waitstream_core(), wizard_apply_handler(), xmldoc_get_syntax_fun(), xmpp_client_authenticate_sasl(), xmpp_join_exec(), xmpp_leave_exec(), xmpp_send_cb(), xmpp_send_exec(), xmpp_sendgroup_exec(), xpidf_allocate_body(), and zapateller_exec().

◆ ast_strndup

#define ast_strndup (   str,
  len 
)    __ast_strndup((str), (len), __FILE__, __LINE__, __PRETTY_FUNCTION__)

A wrapper for strndup()

ast_strndup() is a wrapper for strndup() that will generate an Asterisk log message in the case that the allocation fails.

ast_strndup(), unlike strndup(), can safely accept a NULL argument for the string to duplicate. If a NULL argument is provided, ast_strdup will return NULL without generating any kind of error log message.

The arguments and return value are the same as strndup()

Definition at line 258 of file astmm.h.

Referenced by ast_cli_completion_vector(), ast_recvtext(), ast_rtp_ice_add_cand(), ast_websocket_read_string(), get_content_type(), get_media_encryption_type(), sendtext_safe(), and setup_sdes_srtp().

◆ ast_vasprintf

#define ast_vasprintf (   ret,
  fmt,
  ap 
)    __ast_vasprintf((ret), (fmt), (ap), __FILE__, __LINE__, __PRETTY_FUNCTION__)

A wrapper for vasprintf()

ast_vasprintf() is a wrapper for vasprintf() that will generate an Asterisk log message in the case that the allocation fails.

The arguments and return value are the same as vasprintf()

Definition at line 280 of file astmm.h.

Referenced by ast_cc_monitor_failed(), ast_json_vstringf(), ast_udptl_set_tag(), execute_and_consume(), and xmldoc_reverse_helper().

◆ ASTMM_BLOCK

#define ASTMM_BLOCK   0

ASTMM_LIBC can be defined to control the meaning of standard allocators.

Note
The standard allocators effected by this compiler define are: malloc, calloc, realloc, strdup, strndup, asprintf, vasprintf and free.

Produce compiler errors if standard allocators are used.

Note
This is the default option, and in most cases the correct option. Any use of standard allocators will cause an error, even if those uses are in unused static inline header functions.

Definition at line 87 of file astmm.h.

◆ ASTMM_IGNORE

#define ASTMM_IGNORE   2

Standard allocators are used directly.

Note
This option is needed when including 3rd party headers with calls to standard allocators from inline functions. Using ASTMM_REDIRECT in this situation could result in an object being allocated by malloc and freed by ast_free, or the reverse.

Definition at line 109 of file astmm.h.

◆ ASTMM_LIBC

#define ASTMM_LIBC   ASTMM_BLOCK

}@

Definition at line 117 of file astmm.h.

◆ ASTMM_REDIRECT

#define ASTMM_REDIRECT   1

Redirect standard allocators to use Asterisk functions.

Note
This option is used in some cases instead of changing the existing source to use Asterisk functions. New code should generally avoid this option, except where it's needed to work with situations where switching the code is unreasonable, such as output from code generators that are hard coded to use standard functions.

Definition at line 99 of file astmm.h.

◆ calloc

#define calloc (   a,
  b 
)    Do_not_use_calloc__use_ast_calloc->fail(a, b)

◆ free

#define free (   a)    Do_not_use_free__use_ast_free_or_ast_std_free_for_remotely_allocated_memory->fail(a)

Definition at line 161 of file astmm.h.

◆ malloc

#define malloc (   a)    Do_not_use_malloc__use_ast_malloc->fail(a)

Definition at line 159 of file astmm.h.

◆ realloc

#define realloc (   a,
  b 
)    Do_not_use_realloc__use_ast_realloc->fail(a, b)

◆ strdup

#define strdup (   a)    Do_not_use_strdup__use_ast_strdup->fail(a)

◆ strndup

#define strndup (   a,
  b 
)    Do_not_use_strndup__use_ast_strndup->fail(a, b)

Definition at line 167 of file astmm.h.

◆ vasprintf

#define vasprintf (   a,
  b,
  c 
)    Do_not_use_vasprintf__use_ast_vasprintf->fail(a, b, c)

Definition at line 171 of file astmm.h.

Function Documentation

◆ __ast_asprintf()

int __ast_asprintf ( const char *  file,
int  lineno,
const char *  func,
char **  strp,
const char *  format,
  ... 
)

Definition at line 1712 of file astmm.c.

References __ast_repl_vasprintf(), MALLOC_FAILURE_MSG, and NULL.

1713 {
1714  int res;
1715  va_list ap;
1716 
1717  va_start(ap, format);
1718  res = __ast_repl_vasprintf(strp, format, ap, file, lineno, func);
1719  if (res < 0) {
1720  /*
1721  * *strp is undefined so set to NULL to ensure it is
1722  * initialized to something useful.
1723  */
1724  *strp = NULL;
1725 
1727  }
1728  va_end(ap);
1729 
1730  return res;
1731 }
#define NULL
Definition: resample.c:96
int __ast_repl_vasprintf(char **strp, const char *format, va_list ap, const char *file, int lineno, const char *func)
Definition: astmm.c:1626
static snd_pcm_format_t format
Definition: chan_alsa.c:102
#define MALLOC_FAILURE_MSG
Definition: astmm.c:70

◆ __ast_calloc()

void* __ast_calloc ( size_t  nmemb,
size_t  size,
const char *  file,
int  lineno,
const char *  func 
)
Examples:
/usr/src/asterisk-18.5.0/include/asterisk/strings.h.

Definition at line 1635 of file astmm.c.

References __ast_repl_calloc(), and MALLOC_FAILURE_MSG.

Referenced by __ast_calloc_with_stringfields(), __ast_datastore_alloc(), __ast_frdup(), _ast_hashtab_create(), _ast_hashtab_dup(), _ast_hashtab_insert_immediate_bucket(), _ast_hashtab_resize(), _ast_hashtab_start_traversal(), _ast_hashtab_start_write_traversal(), _ast_heap_create(), _ast_var_assign(), _ast_variable_new(), add_string_pool(), ast_frame_header_new(), and internal_ao2_alloc().

1636 {
1637  void *p;
1638 
1639  p = __ast_repl_calloc(nmemb, size, file, lineno, func);
1640  if (!p) {
1642  }
1643 
1644  return p;
1645 }
void * __ast_repl_calloc(size_t nmemb, size_t size, const char *file, int lineno, const char *func)
Definition: astmm.c:1565
#define MALLOC_FAILURE_MSG
Definition: astmm.c:70

◆ __ast_calloc_cache()

void* __ast_calloc_cache ( size_t  nmemb,
size_t  size,
const char *  file,
int  lineno,
const char *  func 
)

Definition at line 1647 of file astmm.c.

References __ast_repl_calloc_cache(), and MALLOC_FAILURE_MSG.

1648 {
1649  void *p;
1650 
1651  p = __ast_repl_calloc_cache(nmemb, size, file, lineno, func);
1652  if (!p) {
1654  }
1655 
1656  return p;
1657 
1658 }
static void * __ast_repl_calloc_cache(size_t nmemb, size_t size, const char *file, int lineno, const char *func)
Definition: astmm.c:1572
#define MALLOC_FAILURE_MSG
Definition: astmm.c:70

◆ __ast_free()

void __ast_free ( void *  ptr,
const char *  file,
int  lineno,
const char *  func 
)

Definition at line 1586 of file astmm.c.

References free().

1587 {
1588  free(ptr);
1589 }
void free()

◆ __ast_malloc()

void* __ast_malloc ( size_t  size,
const char *  file,
int  lineno,
const char *  func 
)

Definition at line 1660 of file astmm.c.

References __ast_repl_malloc(), and MALLOC_FAILURE_MSG.

Referenced by __ast_cc_config_params_init(), and _ast_heap_create().

1661 {
1662  void *p;
1663 
1664  p = __ast_repl_malloc(size, file, lineno, func);
1665  if (!p) {
1667  }
1668 
1669  return p;
1670 }
void * __ast_repl_malloc(size_t size, const char *file, int lineno, const char *func)
Definition: astmm.c:1579
#define MALLOC_FAILURE_MSG
Definition: astmm.c:70

◆ __ast_realloc()

void* __ast_realloc ( void *  ptr,
size_t  size,
const char *  file,
int  lineno,
const char *  func 
)
Examples:
/usr/src/asterisk-18.5.0/include/asterisk/strings.h.

Definition at line 1672 of file astmm.c.

References __ast_repl_realloc(), and MALLOC_FAILURE_MSG.

Referenced by grow_heap().

1673 {
1674  void *newp;
1675 
1676  newp = __ast_repl_realloc(ptr, size, file, lineno, func);
1677  if (!newp) {
1679  }
1680 
1681  return newp;
1682 }
void * __ast_repl_realloc(void *ptr, size_t size, const char *file, int lineno, const char *func)
Definition: astmm.c:1591
#define MALLOC_FAILURE_MSG
Definition: astmm.c:70

◆ __ast_repl_asprintf()

int __ast_repl_asprintf ( const char *  file,
int  lineno,
const char *  func,
char **  strp,
const char *  format,
  ... 
)

Definition at line 1612 of file astmm.c.

References DEBUG_CHAOS_RETURN, and vasprintf().

1613 {
1614  int res;
1615  va_list ap;
1616 
1617  DEBUG_CHAOS_RETURN(DEBUG_CHAOS_ALLOC_CHANCE, -1);
1618 
1619  va_start(ap, format);
1620  res = vasprintf(strp, format, ap);
1621  va_end(ap);
1622 
1623  return res;
1624 }
int vasprintf(char **strp, const char *fmt, va_list ap)
#define DEBUG_CHAOS_RETURN(c, f)
DEBUG_CHAOS returns failure randomly.
Definition: astmm.c:59
static snd_pcm_format_t format
Definition: chan_alsa.c:102

◆ __ast_repl_calloc()

void* __ast_repl_calloc ( size_t  nmemb,
size_t  size,
const char *  file,
int  lineno,
const char *  func 
)

Definition at line 1565 of file astmm.c.

References calloc, DEBUG_CHAOS_RETURN, and NULL.

Referenced by __ast_calloc().

1566 {
1567  DEBUG_CHAOS_RETURN(DEBUG_CHAOS_ALLOC_CHANCE, NULL);
1568 
1569  return calloc(nmemb, size);
1570 }
#define NULL
Definition: resample.c:96
#define calloc(a, b)
Definition: astmm.h:157
#define DEBUG_CHAOS_RETURN(c, f)
DEBUG_CHAOS returns failure randomly.
Definition: astmm.c:59

◆ __ast_repl_malloc()

void* __ast_repl_malloc ( size_t  size,
const char *  file,
int  lineno,
const char *  func 
)

Definition at line 1579 of file astmm.c.

References DEBUG_CHAOS_RETURN, malloc(), and NULL.

Referenced by __ast_malloc().

1580 {
1581  DEBUG_CHAOS_RETURN(DEBUG_CHAOS_ALLOC_CHANCE, NULL);
1582 
1583  return malloc(size);
1584 }
#define NULL
Definition: resample.c:96
#define DEBUG_CHAOS_RETURN(c, f)
DEBUG_CHAOS returns failure randomly.
Definition: astmm.c:59
char * malloc()

◆ __ast_repl_realloc()

void* __ast_repl_realloc ( void *  ptr,
size_t  size,
const char *  file,
int  lineno,
const char *  func 
)

Definition at line 1591 of file astmm.c.

References DEBUG_CHAOS_RETURN, NULL, and realloc.

Referenced by __ast_realloc().

1592 {
1593  DEBUG_CHAOS_RETURN(DEBUG_CHAOS_ALLOC_CHANCE, NULL);
1594 
1595  return realloc(ptr, size);
1596 }
#define realloc(a, b)
Definition: astmm.h:163
#define NULL
Definition: resample.c:96
#define DEBUG_CHAOS_RETURN(c, f)
DEBUG_CHAOS returns failure randomly.
Definition: astmm.c:59

◆ __ast_repl_strdup()

char* __ast_repl_strdup ( const char *  s,
const char *  file,
int  lineno,
const char *  func 
)

Definition at line 1598 of file astmm.c.

References DEBUG_CHAOS_RETURN, NULL, and strdup.

Referenced by __ast_strdup().

1599 {
1600  DEBUG_CHAOS_RETURN(DEBUG_CHAOS_ALLOC_CHANCE, NULL);
1601 
1602  return strdup(s);
1603 }
#define NULL
Definition: resample.c:96
#define DEBUG_CHAOS_RETURN(c, f)
DEBUG_CHAOS returns failure randomly.
Definition: astmm.c:59
#define strdup(a)
Definition: astmm.h:165

◆ __ast_repl_strndup()

char* __ast_repl_strndup ( const char *  s,
size_t  n,
const char *  file,
int  lineno,
const char *  func 
)

Definition at line 1605 of file astmm.c.

References DEBUG_CHAOS_RETURN, NULL, and strndup().

Referenced by __ast_strndup().

1606 {
1607  DEBUG_CHAOS_RETURN(DEBUG_CHAOS_ALLOC_CHANCE, NULL);
1608 
1609  return strndup(s, n);
1610 }
char * strndup(const char *, size_t)
#define NULL
Definition: resample.c:96
#define DEBUG_CHAOS_RETURN(c, f)
DEBUG_CHAOS returns failure randomly.
Definition: astmm.c:59

◆ __ast_repl_vasprintf()

int __ast_repl_vasprintf ( char **  strp,
const char *  format,
va_list  ap,
const char *  file,
int  lineno,
const char *  func 
)

Definition at line 1626 of file astmm.c.

References DEBUG_CHAOS_RETURN, and vasprintf().

Referenced by __ast_asprintf(), and __ast_vasprintf().

1627 {
1628  DEBUG_CHAOS_RETURN(DEBUG_CHAOS_ALLOC_CHANCE, -1);
1629 
1630  return vasprintf(strp, format, ap);
1631 }
int vasprintf(char **strp, const char *fmt, va_list ap)
#define DEBUG_CHAOS_RETURN(c, f)
DEBUG_CHAOS returns failure randomly.
Definition: astmm.c:59
static snd_pcm_format_t format
Definition: chan_alsa.c:102

◆ __ast_strdup()

char* __ast_strdup ( const char *  s,
const char *  file,
int  lineno,
const char *  func 
)

Definition at line 1684 of file astmm.c.

References __ast_repl_strdup(), MALLOC_FAILURE_MSG, and NULL.

1685 {
1686  char *newstr = NULL;
1687 
1688  if (s) {
1689  newstr = __ast_repl_strdup(s, file, lineno, func);
1690  if (!newstr) {
1692  }
1693  }
1694 
1695  return newstr;
1696 }
char * __ast_repl_strdup(const char *s, const char *file, int lineno, const char *func)
Definition: astmm.c:1598
#define NULL
Definition: resample.c:96
#define MALLOC_FAILURE_MSG
Definition: astmm.c:70

◆ __ast_strndup()

char* __ast_strndup ( const char *  s,
size_t  n,
const char *  file,
int  lineno,
const char *  func 
)

Definition at line 1698 of file astmm.c.

References __ast_repl_strndup(), MALLOC_FAILURE_MSG, and NULL.

1699 {
1700  char *newstr = NULL;
1701 
1702  if (s) {
1703  newstr = __ast_repl_strndup(s, n, file, lineno, func);
1704  if (!newstr) {
1706  }
1707  }
1708 
1709  return newstr;
1710 }
char * __ast_repl_strndup(const char *s, size_t n, const char *file, int lineno, const char *func)
Definition: astmm.c:1605
#define NULL
Definition: resample.c:96
#define MALLOC_FAILURE_MSG
Definition: astmm.c:70

◆ __ast_vasprintf()

int __ast_vasprintf ( char **  strp,
const char *  format,
va_list  ap,
const char *  file,
int  lineno,
const char *  func 
)

Definition at line 1733 of file astmm.c.

References __ast_repl_vasprintf(), MALLOC_FAILURE_MSG, and NULL.

1734 {
1735  int res;
1736 
1737  res = __ast_repl_vasprintf(strp, format, ap, file, lineno, func);
1738  if (res < 0) {
1739  /*
1740  * *strp is undefined so set to NULL to ensure it is
1741  * initialized to something useful.
1742  */
1743  *strp = NULL;
1744 
1746  }
1747 
1748  return res;
1749 }
#define NULL
Definition: resample.c:96
int __ast_repl_vasprintf(char **strp, const char *format, va_list ap, const char *file, int lineno, const char *func)
Definition: astmm.c:1626
static snd_pcm_format_t format
Definition: chan_alsa.c:102
#define MALLOC_FAILURE_MSG
Definition: astmm.c:70

◆ ast_free_ptr()

void ast_free_ptr ( void *  ptr)

◆ ast_std_calloc()

void* ast_std_calloc ( size_t  nmemb,
size_t  size 
)

Definition at line 1756 of file astmm.c.

References calloc.

Referenced by ast_get_reentrancy(), and ast_module_register().

1757 {
1758  return calloc(nmemb, size);
1759 }
#define calloc(a, b)
Definition: astmm.h:157

◆ ast_std_free()

void ast_std_free ( void *  ptr)

◆ ast_std_malloc()

void* ast_std_malloc ( size_t  size)

Definition at line 1751 of file astmm.c.

References malloc().

1752 {
1753  return malloc(size);
1754 }
char * malloc()

◆ ast_std_realloc()

void* ast_std_realloc ( void *  ptr,
size_t  size 
)

Definition at line 1761 of file astmm.c.

References realloc.

1762 {
1763  return realloc(ptr, size);
1764 }
#define realloc(a, b)
Definition: astmm.h:163