Memory Pool Functions
[Brought To You By APR]

Collaboration diagram for Memory Pool Functions:

Functions

void switch_pool_clear (switch_memory_pool_t *p)


Function Documentation

void switch_pool_clear ( switch_memory_pool_t p  ) 

Clear all memory in the pool and run all the cleanups. This also destroys all subpools.

Parameters:
p The pool to clear
Remarks:
This does not actually free the memory, it just allows the pool to re-use this memory for the next allocation.
See also:
apr_pool_destroy()

Definition at line 325 of file switch_core_memory.c.

00326 {
00327 #ifdef PER_POOL_LOCK
00328         apr_thread_mutex_t *my_mutex;
00329         apr_pool_mutex_set(p, NULL);
00330 #endif
00331 
00332         apr_pool_clear(p);
00333 
00334 #ifdef PER_POOL_LOCK
00335 
00336         if ((apr_thread_mutex_create(&my_mutex, APR_THREAD_MUTEX_NESTED, p)) != APR_SUCCESS) {
00337                 abort();
00338         }
00339 
00340         apr_pool_mutex_set(p, my_mutex);
00341 
00342 #endif
00343 
00344 }


Generated on Wed May 16 04:00:17 2012 for FreeSWITCH API Documentation by  doxygen 1.4.7