Skip to content

Commit

Permalink
shm: Remove unused/deprecated functions
Browse files Browse the repository at this point in the history
(cherry picked from commit 6ecd6bf)
  • Loading branch information
liviuchircu committed May 27, 2019
1 parent 5ff0afe commit 0efb9ac
Showing 1 changed file with 0 additions and 47 deletions.
47 changes: 0 additions & 47 deletions mem/shm_mem.c
Expand Up @@ -211,53 +211,6 @@ void shm_event_raise(long used, long size, long perc)
}
#endif



inline static void* sh_realloc(void* p, unsigned int size)
{
void *r;

shm_lock();

#ifndef HP_MALLOC
shm_free_unsafe(p);
r = shm_malloc_unsafe(size);
#else
shm_free(p);
r = shm_malloc(size);
#endif

shm_threshold_check();

shm_unlock();

return r;
}

/* look at a buffer if there is perhaps enough space for the new size
if so, we return current buffer again; otherwise, we free it,
allocate a new one and return it; no guarantee for buffer content;
if allocation fails, we return NULL
*/

#ifdef DBG_MALLOC
void* _shm_resize( void* p, unsigned int s, const char* file, const char* func,
int line)
#else
void* _shm_resize( void* p , unsigned int s)
#endif
{
if (p==0) {
LM_DBG("resize(0) called\n");
return shm_malloc( s );
}

return sh_realloc( p, s );
}




/*
* Allocates memory using mmap or sysv shmap
* - fd: a handler to a file descriptor pointing to a map file
Expand Down

0 comments on commit 0efb9ac

Please sign in to comment.