Skip to content

Commit

Permalink
HP_MALLOC: Do not attempt mem warming with non-HP allocator
Browse files Browse the repository at this point in the history
  • Loading branch information
liviuchircu committed Jan 22, 2020
1 parent b2191bb commit 4afb6fa
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions mem/shm_mem.c
Expand Up @@ -659,12 +659,16 @@ mi_response_t *mi_shm_check(const mi_params_t *params,
void init_shm_post_yyparse(void)
{
#ifdef HP_MALLOC
if (mem_warming_enabled && hp_mem_warming(shm_block) != 0) {
LM_INFO("skipped memory warming\n");
}
if (mem_allocator_shm == MM_HP_MALLOC ||
mem_allocator_shm == MM_HP_MALLOC_DBG)
mem_allocator_shm == MM_HP_MALLOC_DBG) {

if (mem_warming_enabled && hp_mem_warming(shm_block) != 0)
LM_INFO("skipped memory warming\n");

hp_init_shm_statistics(shm_block);
} else if (mem_warming_enabled) {
LM_WARN("SHM memory warming only makes sense with HP_MALLOC!\n");
}
#endif

#ifdef SHM_EXTRA_STATS
Expand Down

0 comments on commit 4afb6fa

Please sign in to comment.