diff --git a/src/lam/mem/free_list.h b/src/lam/mem/free_list.h index 0a7d378818..808d3057cd 100644 --- a/src/lam/mem/free_list.h +++ b/src/lam/mem/free_list.h @@ -36,7 +36,7 @@ int lam_free_list_init_with( int num_elements_to_alloc, int max_elements_to_alloc, int num_elements_per_alloc, - lam_allocator_t); + lam_allocator_t*); static inline lam_list_item_t *lam_free_list_get(lam_free_list_t * list, int *rc) { diff --git a/src/lam/mem/free_lists.c b/src/lam/mem/free_lists.c index f4e32f162c..4e71e5bab2 100644 --- a/src/lam/mem/free_lists.c +++ b/src/lam/mem/free_lists.c @@ -301,7 +301,7 @@ static int lam_free_lists_mem_pool_init(lam_free_lists_t *flist, STATIC_INIT(flist->fl_pool, &shmem_pool_cls); } else { /* process private memory allocation */ - flist->fl_pool = NEW(lam_mem_pool_t, &mem_pool_cls); + flist->fl_pool = OBJ_CREATE(lam_mem_pool_t, &mem_pool_cls); } err = lam_mp_init_with( diff --git a/src/lam/mem/mem_pool.c b/src/lam/mem/mem_pool.c index ad32153dfd..47eed47e9c 100644 --- a/src/lam/mem/mem_pool.c +++ b/src/lam/mem/mem_pool.c @@ -27,7 +27,7 @@ void lam_mp_init(lam_mem_pool_t *pool) { SUPER_INIT(pool, mem_pool_cls.cls_parent); - pool->mp_private_alloc = NEW(lam_allocator_t, &allocator_cls); + pool->mp_private_alloc = OBJ_CREATE(lam_allocator_t, &allocator_cls); lam_mutex_init(&(pool->mp_lock)); pool->mp_dev_alloc = NULL; } @@ -36,7 +36,7 @@ void lam_mp_shared_init(lam_mem_pool_t *pool) { SUPER_INIT(pool, shmem_pool_cls.cls_parent); - pool->mp_private_alloc = NEW(lam_allocator_t, &allocator_cls); + pool->mp_private_alloc = OBJ_CREATE(lam_allocator_t, &allocator_cls); lam_mutex_init(&(pool->mp_lock)); lam_alc_set_is_shared(pool->mp_private_alloc, 1); lam_alc_set_mem_prot(pool->mp_private_alloc, MMAP_SHARED_PROT); @@ -276,7 +276,7 @@ void lam_fmp_init(lam_fixed_mpool_t *pool) { SUPER_INIT(pool, &lam_object_cls); - pool->fmp_private_alloc = NEW(lam_allocator_t, &allocator_cls); + pool->fmp_private_alloc = OBJ_CREATE(lam_allocator_t, &allocator_cls); lam_alc_set_is_shared(pool->fmp_private_alloc, 1); lam_alc_set_mem_prot(pool->fmp_private_alloc, MMAP_SHARED_PROT);