diff --git a/shm_init.c b/shm_init.c index 19e611747f3..a02eb04bbbe 100644 --- a/shm_init.c +++ b/shm_init.c @@ -22,11 +22,19 @@ */ #include "shm_init.h" -#include "mem/mem.h" +#include "mem/shm.h" #include "globals.h" static int shm_init = 0; +static char *shm_mname = 0; +/** + * + */ +void shm_set_mname(char *mname) +{ + shm_mname = mname; +} /** check if shm is initialized. * @return 1 if initialized, 0 if not @@ -62,9 +70,7 @@ int init_shm() goto error; } } - if (shm_mem_size == 0) - shm_mem_size=SHM_MEM_SIZE * 1024 * 1024; - if (init_shm_mallocs(shm_force_alloc)==-1) + if (shm_init_manager(shm_mname)<0) goto error; shm_init=1; return 0; diff --git a/shm_init.h b/shm_init.h index 60b233f37f1..178800b6b74 100644 --- a/shm_init.h +++ b/shm_init.h @@ -26,6 +26,7 @@ int shm_initialized(void); int init_shm(void); +void shm_set_mname(char *mname); #endif /*__shm_init_h*/