FreeSWITCH API Documentation  1.7.0
Macros | Functions
Memory Pooling/Allocation
+ Collaboration diagram for Memory Pooling/Allocation:

Macros

#define switch_core_new_memory_pool(p)   switch_core_perform_new_memory_pool(p, __FILE__, __SWITCH_FUNC__, __LINE__)
 Create a new sub memory pool from the core's master pool. More...
 
#define switch_core_destroy_memory_pool(p)   switch_core_perform_destroy_memory_pool(p, __FILE__, __SWITCH_FUNC__, __LINE__)
 Returns a subpool back to the main pool. More...
 
#define switch_core_permanent_alloc(_memory)   switch_core_perform_permanent_alloc(_memory, __FILE__, __SWITCH_FUNC__, __LINE__)
 Allocate memory from the main pool with no intention of returning it. More...
 
#define switch_core_alloc(_pool, _mem)   switch_core_perform_alloc(_pool, _mem, __FILE__, __SWITCH_FUNC__, __LINE__)
 Allocate memory directly from a memory pool. More...
 
#define switch_core_session_alloc(_session, _memory)   switch_core_perform_session_alloc(_session, _memory, __FILE__, __SWITCH_FUNC__, __LINE__)
 Allocate memory from a session's pool. More...
 
#define switch_core_permanent_strdup(_todup)   switch_core_perform_permanent_strdup(_todup, __FILE__, __SWITCH_FUNC__, __LINE__)
 Copy a string using permanent memory allocation. More...
 
#define switch_core_session_strdup(_session, _todup)   switch_core_perform_session_strdup(_session, _todup, __FILE__, __SWITCH_FUNC__, __LINE__)
 Copy a string using memory allocation from a session's pool. More...
 
#define switch_core_strdup(_pool, _todup)   switch_core_perform_strdup(_pool, _todup, __FILE__, __SWITCH_FUNC__, __LINE__)
 Copy a string using memory allocation from a given pool. More...
 

Functions

int switch_core_session_sync_clock (void)
 
switch_status_t switch_core_perform_destroy_memory_pool (_Inout_ switch_memory_pool_t **pool, _In_z_ const char *file, _In_z_ const char *func, _In_ int line)
 
void switch_core_memory_pool_set_data (switch_memory_pool_t *pool, const char *key, void *data)
 
void * switch_core_memory_pool_get_data (switch_memory_pool_t *pool, const char *key)
 
void switch_core_session_run (_In_ switch_core_session_t *session)
 Start the session's state machine. More...
 
unsigned int switch_core_session_running (_In_ switch_core_session_t *session)
 determine if the session's state machine is running More...
 
unsigned int switch_core_session_started (_In_ switch_core_session_t *session)
 
void * switch_core_perform_permanent_alloc (_In_ switch_size_t memory, _In_z_ const char *file, _In_z_ const char *func, _In_ int line)
 
void * switch_core_perform_alloc (_In_ switch_memory_pool_t *pool, _In_ switch_size_t memory, _In_z_ const char *file, _In_z_ const char *func, _In_ int line)
 
_Ret_ void * switch_core_perform_session_alloc (_In_ switch_core_session_t *session, _In_ switch_size_t memory, const char *file, const char *func, int line)
 
char * switch_core_perform_permanent_strdup (_In_z_ const char *todup, _In_z_ const char *file, _In_z_ const char *func, _In_ int line)
 
char * switch_core_perform_session_strdup (_In_ switch_core_session_t *session, _In_z_ const char *todup, _In_z_ const char *file, _In_z_ const char *func, _In_ int line)
 
char * switch_core_perform_strdup (_In_ switch_memory_pool_t *pool, _In_z_ const char *todup, _In_z_ const char *file, _In_z_ const char *func, _In_ int line)
 
char * switch_core_session_sprintf (_In_ switch_core_session_t *session, _In_z_ _Printf_format_string_ const char *fmt,...)
 printf-style style printing routine. The data is output to a string allocated from the session More...
 
char * switch_core_session_vsprintf (switch_core_session_t *session, const char *fmt, va_list ap)
 printf-style style printing routine. The data is output to a string allocated from the session More...
 
char * switch_core_sprintf (_In_ switch_memory_pool_t *pool, _In_z_ _Printf_format_string_ const char *fmt,...)
 printf-style style printing routine. The data is output to a string allocated from the pool More...
 
char * switch_core_vsprintf (switch_memory_pool_t *pool, _In_z_ _Printf_format_string_ const char *fmt, va_list ap)
 printf-style style printing routine. The data is output to a string allocated from the pool More...
 
switch_memory_pool_tswitch_core_session_get_pool (_In_ switch_core_session_t *session)
 Retrieve the memory pool from a session. More...
 

Detailed Description

Macro Definition Documentation

#define switch_core_alloc (   _pool,
  _mem 
)    switch_core_perform_alloc(_pool, _mem, __FILE__, __SWITCH_FUNC__, __LINE__)

Allocate memory directly from a memory pool.

Parameters
_poolthe memory pool to allocate from
_memthe number of bytes to allocate
Remarks
the memory returned has been memset to zero
Returns
a void pointer to the allocated memory

Definition at line 682 of file switch_core.h.

Referenced by add_uuid(), check_queue(), create_device_record(), create_handle(), find_free_frame(), new_job(), new_node(), process_device_hup(), switch_buffer_create(), switch_buffer_create_partition(), switch_caller_extension_clone(), switch_caller_profile_dup(), switch_caller_profile_new(), switch_channel_alloc(), switch_channel_bind_device_state_handler(), switch_channel_set_originator_caller_profile(), switch_channel_set_profile_var(), switch_core_codec_add_implementation(), switch_core_codec_add_video_implementation(), switch_core_launch_thread(), switch_core_media_add_payload_map(), switch_core_perform_file_open(), switch_core_port_allocator_new(), switch_core_session_findall_matching_var(), switch_core_session_hupall(), switch_core_session_hupall_endpoint(), switch_core_session_hupall_matching_var_ans(), switch_core_session_request_uuid(), switch_core_speech_read_tts(), switch_escape_char(), switch_escape_string_pool(), switch_find_parameter(), switch_frame_buffer_create(), switch_img_txt_handle_create(), switch_ivr_bg_media(), switch_ivr_digit_stream_parser_new(), switch_ivr_dmachine_bind(), switch_ivr_dmachine_create(), switch_ivr_menu_bind_action(), switch_ivr_menu_bind_function(), switch_ivr_menu_init(), switch_ivr_menu_stack_xml_add(), switch_ivr_menu_stack_xml_init(), switch_jb_create(), switch_live_array_add_alias(), switch_live_array_create(), switch_load_core_config(), switch_loadable_module_build_dynamic(), switch_loadable_module_create_module_interface(), switch_loadable_module_load_file(), switch_loadable_module_load_module_ex(), switch_loadable_module_process(), switch_log_bind_logger(), switch_media_handle_create(), switch_network_list_add_host_mask(), switch_network_list_create(), switch_network_list_perform_add_cidr_token(), switch_rtp_add_crypto_key(), switch_rtp_add_dtls(), switch_rtp_create(), switch_rtp_get_stats(), switch_speex_init(), switch_sql_queue_manager_init_name(), switch_system_thread(), switch_util_quote_shell_arg_pool(), switch_xml_bind_search_function_ret(), switch_xml_free_in_thread(), and timer_init().

#define switch_core_destroy_memory_pool (   p)    switch_core_perform_destroy_memory_pool(p, __FILE__, __SWITCH_FUNC__, __LINE__)

Returns a subpool back to the main pool.

Returns
SWITCH_STATUS_SUCCESS on success

Definition at line 640 of file switch_core.h.

Referenced by check_queue(), EventConsumer::cleanup(), destroy_thread(), do_shutdown(), main(), sql_close(), sql_in_thread(), switch_channel_clear_device_record(), switch_core_asr_close(), switch_core_codec_destroy(), switch_core_destroy(), switch_core_directory_close(), switch_core_file_close(), switch_core_media_deinit(), switch_core_perform_file_open(), switch_core_port_allocator_destroy(), switch_core_port_allocator_new(), switch_core_session_findall_matching_var(), switch_core_session_hupall(), switch_core_session_hupall_endpoint(), switch_core_session_hupall_matching_var_ans(), switch_core_session_perform_destroy(), switch_core_session_thread_pool_worker(), switch_core_speech_close(), switch_core_timer_destroy(), switch_directory_exists(), switch_file_exists(), switch_frame_buffer_destroy(), switch_img_txt_handle_create(), switch_img_txt_handle_destroy(), switch_ivr_digit_stream_parser_destroy(), switch_ivr_digit_stream_parser_new(), switch_ivr_dmachine_destroy(), switch_ivr_enterprise_originate(), switch_ivr_menu_init(), switch_ivr_menu_stack_free(), switch_ivr_originate(), switch_jb_destroy(), switch_live_array_destroy(), switch_load_network_lists(), switch_load_timezones(), switch_loadable_module_build_dynamic(), switch_loadable_module_exec(), switch_loadable_module_load_file(), switch_loadable_module_shutdown(), SWITCH_MODULE_SHUTDOWN_FUNCTION(), switch_scheduler_task_thread_stop(), switch_sql_queue_manager_destroy(), switch_system_thread(), system_thread(), task_own_thread(), test_port(), and IVRMenu::~IVRMenu().

#define switch_core_new_memory_pool (   p)    switch_core_perform_new_memory_pool(p, __FILE__, __SWITCH_FUNC__, __LINE__)

Create a new sub memory pool from the core's master pool.

Returns
SWITCH_STATUS_SUCCESS on success

Definition at line 631 of file switch_core.h.

Referenced by check_queue(), create_device_record(), create_handle(), EventConsumer::EventConsumer(), IVRMenu::IVRMenu(), main(), new_job(), switch_core_asr_open(), switch_core_codec_init_with_bitrate(), switch_core_directory_open(), switch_core_launch_thread(), switch_core_media_init(), switch_core_perform_file_open(), switch_core_port_allocator_new(), switch_core_session_findall_matching_var(), switch_core_session_hupall(), switch_core_session_hupall_endpoint(), switch_core_session_hupall_matching_var_ans(), switch_core_session_request_uuid(), switch_core_speech_open(), switch_core_timer_init(), switch_directory_exists(), switch_file_exists(), switch_frame_buffer_create(), switch_img_txt_handle_create(), switch_ivr_bg_media(), switch_ivr_digit_stream_parser_new(), switch_ivr_dmachine_create(), switch_ivr_enterprise_originate(), switch_ivr_menu_init(), switch_ivr_menu_stack_xml_init(), switch_ivr_originate(), switch_jb_create(), switch_live_array_create(), switch_load_network_lists(), switch_load_timezones(), switch_loadable_module_build_dynamic(), switch_loadable_module_init(), switch_loadable_module_load_file(), switch_network_list_create(), switch_scheduler_task_thread_start(), switch_sql_queue_manager_init_name(), switch_ssl_init_ssl_locks(), switch_system_thread(), switch_xml_free_in_thread(), task_thread_loop(), and test_port().

#define switch_core_permanent_alloc (   _memory)    switch_core_perform_permanent_alloc(_memory, __FILE__, __SWITCH_FUNC__, __LINE__)

Allocate memory from the main pool with no intention of returning it.

Parameters
_memorythe number of bytes to allocate
Returns
a void pointer to the allocated memory
Note
this memory never goes out of scope until the core is destroyed

Definition at line 669 of file switch_core.h.

#define switch_core_permanent_strdup (   _todup)    switch_core_perform_permanent_strdup(_todup, __FILE__, __SWITCH_FUNC__, __LINE__)

Copy a string using permanent memory allocation.

Parameters
_todupthe string to duplicate
Returns
a pointer to the newly duplicated string

Definition at line 705 of file switch_core.h.

Referenced by console_xml_config(), and switch_core_mime_add_type().

#define switch_core_session_alloc (   _session,
  _memory 
)    switch_core_perform_session_alloc(_session, _memory, __FILE__, __SWITCH_FUNC__, __LINE__)

Allocate memory from a session's pool.

Parameters
_sessionthe session to request memory from
_memorythe amount of memory to allocate
Returns
a void pointer to the newly allocated memory
Note
the memory will be in scope as long as the session exists

Definition at line 694 of file switch_core.h.

Referenced by check_channel_status(), check_jitter(), hanguphook(), recording_thread(), send_display(), switch_caller_extension_add_application(), switch_caller_extension_new(), switch_channel_perform_audio_sync(), switch_channel_perform_video_sync(), switch_channel_set_app_flag_key(), switch_channel_set_caller_profile(), switch_channel_set_flag_value(), switch_core_media_bug_add(), switch_core_media_copy_t38_options(), switch_core_media_negotiate_sdp(), switch_core_media_patch_sdp(), switch_core_media_process_udptl(), switch_core_session_exec(), switch_core_session_execute_exten(), switch_core_session_raw_read(), switch_core_session_request_xml(), switch_core_session_thread_pool_launch(), switch_ivr_activate_unicast(), switch_ivr_bind_dtmf_meta_session(), switch_ivr_broadcast_in_thread(), switch_ivr_detect_speech_init(), switch_ivr_displace_session(), switch_ivr_eavesdrop_exec_all(), switch_ivr_eavesdrop_session(), switch_ivr_eavesdrop_update_display(), switch_ivr_inband_dtmf_generate_session(), switch_ivr_inband_dtmf_session(), switch_ivr_multi_threaded_bridge(), switch_ivr_preprocess_session(), switch_ivr_record_session(), switch_ivr_record_user_data_dup(), switch_ivr_session_audio(), switch_ivr_set_user_xml(), switch_ivr_speak_text(), switch_ivr_tone_detect_session(), switch_ivr_video_write_overlay_session(), switch_media_handle_create(), video_bug_thread(), video_helper_thread(), and video_write_thread().

#define switch_core_session_strdup (   _session,
  _todup 
)    switch_core_perform_session_strdup(_session, _todup, __FILE__, __SWITCH_FUNC__, __LINE__)

Copy a string using memory allocation from a session's pool.

Parameters
_sessiona session to use for allocation
_todupthe string to duplicate
Returns
a pointer to the newly duplicated string

Definition at line 717 of file switch_core.h.

Referenced by _switch_core_media_pass_zrtp_hash2(), check_channel_status(), check_ice(), do_api_on(), do_execute_on(), exec_app(), gen_ice(), play_and_detect_input_callback(), record_callback(), send_display(), signal_bridge_on_hibernate(), switch_caller_extension_add_application(), switch_caller_extension_new(), switch_channel_caller_extension_masquerade(), switch_channel_export_variable_var_check(), switch_channel_get_hold_music(), switch_channel_get_variable_dup(), switch_channel_get_variable_partner(), switch_channel_handle_cause(), switch_channel_process_export(), switch_channel_queue_dtmf_string(), switch_channel_set_caller_profile(), switch_channel_set_device_id(), switch_channel_set_flag_value(), switch_channel_set_name(), switch_core_media_absorb_sdp(), switch_core_media_add_ice_acl(), switch_core_media_bug_add(), switch_core_media_bug_transfer_recordings(), switch_core_media_choose_port(), switch_core_media_copy_t38_options(), switch_core_media_ext_address_lookup(), switch_core_media_find_zrtp_hash(), switch_core_media_gen_local_sdp(), switch_core_media_negotiate_sdp(), switch_core_media_prepare_codecs(), switch_core_media_process_sdp_filter(), switch_core_media_process_t38_passthru(), switch_core_media_process_udptl(), switch_core_media_proxy_remote_addr(), switch_core_media_recover_session(), switch_core_media_set_codec(), switch_core_media_set_local_sdp(), switch_core_media_set_video_codec(), switch_core_session_check_incoming_crypto(), switch_core_session_exec(), switch_core_session_execute_application_async(), switch_core_session_execute_exten(), switch_core_session_get_recovery_crypto_key(), switch_core_session_outgoing_channel(), switch_core_session_perform_receive_message(), switch_core_session_reporting_state(), switch_core_session_request_xml(), switch_core_session_send_dtmf_string(), switch_core_session_thread(), switch_core_standard_on_routing(), switch_ivr_activate_unicast(), switch_ivr_bind_dtmf_meta_session(), switch_ivr_displace_session(), switch_ivr_eavesdrop_exec_all(), switch_ivr_eavesdrop_session(), switch_ivr_eavesdrop_update_display(), switch_ivr_intercept_session(), switch_ivr_menu_execute(), switch_ivr_multi_threaded_bridge(), switch_ivr_parse_event(), switch_ivr_phrase_macro_event(), switch_ivr_play_file(), switch_ivr_record_file(), switch_ivr_record_session(), switch_ivr_record_user_data_dup(), switch_ivr_say(), switch_ivr_say_ip(), switch_ivr_set_user(), switch_ivr_tone_detect_session(), switch_play_and_get_digits(), switch_process_import(), and transfer_after_bridge().

#define switch_core_strdup (   _pool,
  _todup 
)    switch_core_perform_strdup(_pool, _todup, __FILE__, __SWITCH_FUNC__, __LINE__)

Copy a string using memory allocation from a given pool.

Parameters
_poolthe pool to use for allocation
_todupthe string to duplicate
Returns
a pointer to the newly duplicated string

Definition at line 729 of file switch_core.h.

Referenced by add_uuid(), check_bridge_export(), create_device_record(), new_job(), process_device_hup(), switch_caller_extension_clone(), switch_caller_profile_dup(), switch_caller_profile_new(), switch_channel_caller_extension_masquerade(), switch_channel_flip_cid(), switch_channel_pass_callee_id(), switch_channel_set_profile_var(), switch_core_asr_open(), switch_core_codec_add_implementation(), switch_core_codec_add_video_implementation(), switch_core_codec_init_with_bitrate(), switch_core_get_variable_pdup(), switch_core_media_add_payload_map(), switch_core_perform_file_open(), switch_core_port_allocator_new(), switch_core_session_execute_exten(), switch_core_session_findall_matching_var(), switch_core_session_hupall(), switch_core_session_hupall_endpoint(), switch_core_session_hupall_matching_var_ans(), switch_core_session_set_uuid(), switch_core_speech_open(), switch_img_txt_handle_create(), switch_img_txt_handle_render(), switch_ivr_bg_media(), switch_ivr_dmachine_bind(), switch_ivr_dmachine_create(), switch_ivr_dmachine_set_terminators(), switch_ivr_enterprise_originate(), switch_ivr_menu_bind_action(), switch_ivr_menu_bind_function(), switch_ivr_menu_init(), switch_ivr_menu_stack_xml_add(), switch_ivr_menu_stack_xml_build(), switch_ivr_originate(), switch_ivr_session_transfer(), switch_ivr_uuid_bridge(), switch_live_array_add_alias(), switch_live_array_create(), switch_load_core_config(), switch_load_timezones(), switch_loadable_module_build_dynamic(), switch_loadable_module_create_module_interface(), switch_loadable_module_load_file(), switch_loadable_module_load_module_ex(), switch_loadable_module_process(), switch_network_list_create(), switch_network_list_perform_add_cidr_token(), switch_rtp_activate_ice(), switch_rtp_change_ice_dest(), switch_rtp_create(), switch_rtp_new(), switch_rtp_set_local_address(), switch_rtp_set_remote_address(), switch_sql_queue_manager_init_name(), switch_stun_host_lookup(), switch_stun_lookup(), switch_system_thread(), and switch_xml_config_parse_event().

Function Documentation

void* switch_core_memory_pool_get_data ( switch_memory_pool_t pool,
const char *  key 
)

Definition at line 311 of file switch_core_memory.c.

Referenced by handle_rfc2833(), rtcp_generate_report_block(), rtcp_generate_sender_info(), rtcp_stats(), rtcp_stats_init(), switch_core_codec_init_with_bitrate(), and switch_rtp_create().

312 {
313  void *data = NULL;
314 
315  apr_pool_userdata_get(&data, key, pool);
316 
317  return data;
318 }
switch_memory_pool_t * pool
void switch_core_memory_pool_set_data ( switch_memory_pool_t pool,
const char *  key,
void *  data 
)

Definition at line 306 of file switch_core_memory.c.

Referenced by switch_core_session_request_uuid(), and switch_thread_create().

307 {
308  apr_pool_userdata_set(data, key, NULL, pool);
309 }
switch_memory_pool_t * pool
void* switch_core_perform_alloc ( _In_ switch_memory_pool_t pool,
_In_ switch_size_t  memory,
_In_z_ const char *  file,
_In_z_ const char *  func,
_In_ int  line 
)
switch_status_t switch_core_perform_destroy_memory_pool ( _Inout_ switch_memory_pool_t **  pool,
_In_z_ const char *  file,
_In_z_ const char *  func,
_In_ int  line 
)
void* switch_core_perform_permanent_alloc ( _In_ switch_size_t  memory,
_In_z_ const char *  file,
_In_z_ const char *  func,
_In_ int  line 
)
char* switch_core_perform_permanent_strdup ( _In_z_ const char *  todup,
_In_z_ const char *  file,
_In_z_ const char *  func,
_In_ int  line 
)
_Ret_ void* switch_core_perform_session_alloc ( _In_ switch_core_session_t session,
_In_ switch_size_t  memory,
const char *  file,
const char *  func,
int  line 
)
char* switch_core_perform_session_strdup ( _In_ switch_core_session_t session,
_In_z_ const char *  todup,
_In_z_ const char *  file,
_In_z_ const char *  func,
_In_ int  line 
)
char* switch_core_perform_strdup ( _In_ switch_memory_pool_t pool,
_In_z_ const char *  todup,
_In_z_ const char *  file,
_In_z_ const char *  func,
_In_ int  line 
)
switch_memory_pool_t* switch_core_session_get_pool ( _In_ switch_core_session_t session)
void switch_core_session_run ( _In_ switch_core_session_t session)

Start the session's state machine.

Parameters
sessionthe session on which to start the state machine

Referenced by switch_core_session_thread().

unsigned int switch_core_session_running ( _In_ switch_core_session_t session)

determine if the session's state machine is running

Parameters
sessionthe session on which to check

Referenced by switch_channel_perform_hangup(), and switch_ivr_originate().

char* switch_core_session_sprintf ( _In_ switch_core_session_t session,
_In_z_ _Printf_format_string_ const char *  fmt,
  ... 
)

printf-style style printing routine. The data is output to a string allocated from the session

Parameters
sessiona session to use for allocation
fmtThe format of the string
...The arguments to use while printing the data
Returns
The new string

Referenced by play_and_detect_input_callback(), switch_channel_set_timestamps(), switch_core_media_build_crypto(), switch_core_media_prepare_codecs(), switch_core_session_outgoing_channel(), switch_ivr_displace_session(), switch_ivr_insert_file(), switch_ivr_menu_execute(), switch_ivr_originate(), switch_ivr_play_file(), switch_ivr_record_file(), switch_ivr_record_session(), switch_ivr_session_transfer(), and switch_ivr_wait_for_answer().

unsigned int switch_core_session_started ( _In_ switch_core_session_t session)
int switch_core_session_sync_clock ( void  )

Definition at line 1432 of file switch_core_session.c.

References runtime, SCF_SYNC_CLOCK_REQUESTED, switch_session_manager::session_count, switch_runtime::session_hash_mutex, session_manager, switch_mutex_lock(), switch_mutex_unlock(), switch_set_flag, and switch_time_sync().

Referenced by switch_core_session_ctl().

1433 {
1434  int doit = 0;
1435 
1437  if (session_manager.session_count == 0) {
1438  doit = 1;
1439  } else {
1441  }
1443 
1444  if (doit) {
1445  switch_time_sync();
1446  }
1447 
1448  return doit;
1449 
1450 }
void switch_time_sync(void)
Definition: switch_time.c:589
struct switch_session_manager session_manager
#define switch_set_flag(obj, flag)
Set a flag on an arbitrary object.
Definition: switch_utils.h:631
struct switch_runtime runtime
Definition: switch_core.c:64
switch_status_t switch_mutex_unlock(switch_mutex_t *lock)
Definition: switch_apr.c:290
switch_status_t switch_mutex_lock(switch_mutex_t *lock)
Definition: switch_apr.c:285
switch_mutex_t * session_hash_mutex
char* switch_core_session_vsprintf ( switch_core_session_t session,
const char *  fmt,
va_list  ap 
)

printf-style style printing routine. The data is output to a string allocated from the session

Parameters
sessiona session to use for allocation
fmtThe format of the string
apThe arguments to use while printing the data
Returns
The new string

Definition at line 183 of file switch_core_memory.c.

References switch_core_vsprintf().

184 {
185  return switch_core_vsprintf(session->pool, fmt, ap);
186 }
switch_memory_pool_t * pool
char * switch_core_vsprintf(switch_memory_pool_t *pool, const char *fmt, va_list ap)
char* switch_core_sprintf ( _In_ switch_memory_pool_t pool,
_In_z_ _Printf_format_string_ const char *  fmt,
  ... 
)

printf-style style printing routine. The data is output to a string allocated from the pool

Parameters
poola pool to use for allocation
fmtThe format of the string
...The arguments to use while printing the data
Returns
The new string

Referenced by switch_caller_get_field_by_name(), switch_channel_set_caller_profile(), switch_core_perform_file_open(), switch_img_txt_handle_create(), switch_ivr_session_transfer(), switch_ivr_uuid_bridge(), switch_live_array_add_alias(), switch_live_array_create(), switch_loadable_module_load_file(), switch_network_list_add_host_mask(), switch_rtp_add_dtls(), and switch_rtp_set_local_address().

char* switch_core_vsprintf ( switch_memory_pool_t pool,
_In_z_ _Printf_format_string_ const char *  fmt,
va_list  ap 
)

printf-style style printing routine. The data is output to a string allocated from the pool

Parameters
poola pool to use for allocation
fmtThe format of the string
apThe arguments to use while printing the data
Returns
The new string