aboutsummaryrefslogtreecommitdiffstats
path: root/src/svm/svm.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/svm/svm.c')
-rw-r--r--src/svm/svm.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/svm/svm.c b/src/svm/svm.c
index 7d98fbe936d..d958c8378e5 100644
--- a/src/svm/svm.c
+++ b/src/svm/svm.c
@@ -339,9 +339,13 @@ svm_data_region_create (svm_map_region_args_t * a, svm_region_t * rp)
if (a->flags & SVM_FLAGS_MHEAP)
{
+ mheap_t *heap_header;
rp->data_heap =
mheap_alloc_with_flags ((void *) (rp->data_base), map_size,
MHEAP_FLAG_DISABLE_VM);
+ heap_header = mheap_header (rp->data_heap);
+ heap_header->flags |= MHEAP_FLAG_THREAD_SAFE;
+
rp->flags |= SVM_FLAGS_MHEAP;
}
return 0;