shm_mem.c File Reference

#include <stdlib.h>
#include "shm_mem.h"
#include "../config.h"
#include "../globals.h"

Include dependency graph for shm_mem.c:

Go to the source code of this file.

Functions

void * _shm_resize (void *p, unsigned int s)
static void * sh_realloc (void *p, unsigned int size)
int shm_getmem (void)
void shm_mem_destroy (void)
int shm_mem_init (void)
int shm_mem_init_mallocs (void *mempool, unsigned long pool_size)

Variables

gen_lock_t * mem_lock = 0
struct qm_blockshm_block
static void * shm_mempool = (void*)-1
static int shm_shmid = -1


Function Documentation

void* _shm_resize ( void *  p,
unsigned int  s 
)

Definition at line 100 of file shm_mem.c.

References LM_DBG, sh_realloc(), and shm_malloc().

static void* sh_realloc ( void *  p,
unsigned int  size 
) [inline, static]

Definition at line 77 of file shm_mem.c.

References shm_free_unsafe, shm_lock, shm_malloc_unsafe, and shm_unlock.

Referenced by _shm_resize().

int shm_getmem ( void   ) 

Definition at line 114 of file shm_mem.c.

References LM_CRIT, shm_mem_destroy(), and shm_mem_size.

Referenced by shm_mem_init().

void shm_mem_destroy ( void   ) 

Definition at line 206 of file shm_mem.c.

References LM_DBG, and shm_mem_size.

Referenced by cleanup(), shm_getmem(), and shm_mem_init_mallocs().

int shm_mem_init ( void   ) 

Definition at line 196 of file shm_mem.c.

References shm_getmem(), shm_mem_init_mallocs(), and shm_mem_size.

Referenced by init_shm_mallocs().

int shm_mem_init_mallocs ( void *  mempool,
unsigned long  pool_size 
)

Definition at line 168 of file shm_mem.c.

References LM_CRIT, LM_DBG, shm_malloc_init, shm_malloc_unsafe, and shm_mem_destroy().

Referenced by shm_mem_init().


Variable Documentation

gen_lock_t* mem_lock = 0

Definition at line 67 of file shm_mem.c.

Referenced by cleanup().

Definition at line 73 of file shm_mem.c.

void* shm_mempool = (void*)-1 [static]

Definition at line 69 of file shm_mem.c.

int shm_shmid = -1 [static]

Definition at line 64 of file shm_mem.c.


Generated on Thu May 24 12:00:42 2012 for Kamailio - The Open Source SIP Server by  doxygen 1.5.6