File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -110,17 +110,20 @@ static slab_t *create_slab(bucket_t *bucket) {
110110 // padding at the end of the slab
111111 slab -> slab_size = bucket_slab_alloc_size (bucket );
112112
113+ void * slab_mem_ptr = NULL ;
113114 // TODO not true
114115 // NOTE: originally slabs memory were allocated without alignment
115116 // with this registering a slab is simpler and doesn't require multimap
116- res = umfMemoryProviderAlloc (provider , slab -> slab_size , 0 , & slab -> mem_ptr );
117+ res = umfMemoryProviderAlloc (provider , slab -> slab_size , 0 , & slab_mem_ptr );
117118 if (res != UMF_RESULT_SUCCESS ) {
118119 LOG_ERR ("allocation of slab data failed!" );
119120 goto free_slab ;
120121 }
121122
122123 // raw allocation is not available for user so mark it as inaccessible
123- utils_annotate_memory_inaccessible (slab -> mem_ptr , slab -> slab_size );
124+ utils_annotate_memory_inaccessible (slab_mem_ptr , slab -> slab_size );
125+
126+ utils_atomic_store_release_ptr (& slab -> mem_ptr , slab_mem_ptr );
124127
125128 LOG_DEBUG ("bucket: %p, slab_size: %zu" , (void * )bucket , slab -> slab_size );
126129 return slab ;
You can’t perform that action at this time.
0 commit comments