Просмотр исходного кода

core/mem: set shm type when initializing shared memory pool

Daniel-Constantin Mierla 11 лет назад
Родитель
Сommit
c996d5ddc9
2 измененных файлов с 2 добавлено и 2 удалено
  1. 1 1
      mem/shm_mem.c
  2. 1 1
      mem/shm_mem.h

+ 1 - 1
mem/shm_mem.c

@@ -178,7 +178,7 @@ int shm_getmem(void)
 int shm_mem_init_mallocs(void* mempool, unsigned long pool_size)
 int shm_mem_init_mallocs(void* mempool, unsigned long pool_size)
 {
 {
 	/* init it for malloc*/
 	/* init it for malloc*/
-	shm_block=shm_malloc_init(mempool, pool_size);
+	shm_block=shm_malloc_init(mempool, pool_size, MEM_TYPE_SHM);
 	if (shm_block==0){
 	if (shm_block==0){
 		LOG(L_CRIT, "ERROR: shm_mem_init: could not initialize shared"
 		LOG(L_CRIT, "ERROR: shm_mem_init: could not initialize shared"
 				" malloc\n");
 				" malloc\n");

+ 1 - 1
mem/shm_mem.h

@@ -150,7 +150,7 @@
 #	define MY_STATUS(...) 0
 #	define MY_STATUS(...) 0
 #	define MY_SUMS do{}while(0)
 #	define MY_SUMS do{}while(0)
 #	define MY_MEMINFO	mspace_info
 #	define MY_MEMINFO	mspace_info
-#	define  shm_malloc_init(buf, len) create_mspace_with_base(buf, len, 0)
+#	define  shm_malloc_init(buf, len, type) create_mspace_with_base(buf, len, 0)
 #	define shm_malloc_destroy(b) do{}while(0)
 #	define shm_malloc_destroy(b) do{}while(0)
 #	define shm_malloc_on_fork() do{}while(0)
 #	define shm_malloc_on_fork() do{}while(0)
 #else
 #else