Logo Search packages:      
Sourcecode: sofia-sip version File versions  Download package

SU_DLL void* su_zalloc ( su_home_t home,
isize_t  size 

Allocate and zero a memory block.

The function su_zalloc() allocates a memory block with a given size from given memory home home and zeroes the allocated block.

home pointer to memory pool object
size size of the memory block
The memory home pointer home may be NULL. In that case, the allocated memory block is not associated with any memory home, and it must be freed by calling su_free() or free().
The function su_zalloc() returns a pointer to the allocated memory block, or NULL upon an error.

Definition at line 1344 of file su_alloc.c.

References su_zalloc().

Referenced by msg_buf_external(), nea_event_tcreate(), nea_server_get_subscribers(), nta_incoming_default(), nta_outgoing_default(), nth_site_create(), sip_url_query_as_taglist(), sres_cache_get(), sres_cache_store(), sres_resolver_create(), su_msg_create(), su_timer_create(), su_zalloc(), tport_set_params(), and url_map_new().

  void *data;

  assert (size >= 0);

  if (home) {
    data = sub_alloc(home, MEMLOCK(home), size, 1);
    data = calloc(1, size);

  return data;

Generated by  Doxygen 1.6.0   Back to index