Skip to content

Commit 89f418a

Browse files
committed
zone allocator: use nolock versions of list operations
Zone allocators are used exclusively single-threaded. Signed-off-by: Joseph Schuchart <joseph.schuchart@stonybrook.edu>
1 parent 0d1c399 commit 89f418a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

parsec/utils/zone_malloc.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ void *zone_malloc(zone_malloc_t *gdata, size_t size)
135135
current_segment = (segment_t *)parsec_list_nolock_pop_front(&fl->list);
136136
assert(current_segment->nb_units >= nb_units);
137137
current_segment->status = SEGMENT_FULL;
138-
if (parsec_list_is_empty(&fl->list)) {
138+
if (parsec_list_nolock_is_empty(&fl->list)) {
139139
/* empty chunk list, remove */
140140
parsec_rbtree_remove(&gdata->rbtree, &fl->super);
141141
PARSEC_LIST_ITEM_SINGLETON(&fl->super.super);
@@ -256,7 +256,7 @@ void zone_free(zone_malloc_t *gdata, void *add)
256256
parsec_rbtree_insert(&gdata->rbtree, &fl->super);
257257
}
258258
assert(fl != NULL);
259-
parsec_list_push_front(&fl->list, &current_segment->super);
259+
parsec_list_nolock_push_front(&fl->list, &current_segment->super);
260260
parsec_atomic_unlock(&gdata->lock);
261261
}
262262

0 commit comments

Comments
 (0)