Skip to content

Commit ea33501

Browse files
committed
FIX alignment = 2 MB
1 parent dd0a2c3 commit ea33501

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/provider/provider_devdax_memory.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -542,8 +542,7 @@ static umf_result_t devdax_open_ipc_handle(void *provider,
542542
// length and offset passed to mmap() have to be page-aligned
543543
size_t offset_aligned = devdax_ipc_data->offset;
544544
size_t length_aligned = devdax_ipc_data->length;
545-
utils_align_ptr_down_size_up((void **)&offset_aligned, &length_aligned,
546-
utils_get_page_size());
545+
utils_align_ptr_down_size_up((void **)&offset_aligned, &length_aligned, (2 * 1024 * 1024));
547546

548547
// mmap /dev/dax with the MAP_SYNC xor MAP_SHARED flag (if MAP_SYNC fails)
549548
char *addr =
@@ -582,7 +581,7 @@ static umf_result_t devdax_close_ipc_handle(void *provider, void *ptr,
582581
}
583582

584583
// ptr and size passed to munmap() have to be page-aligned
585-
utils_align_ptr_down_size_up(&ptr, &size, utils_get_page_size());
584+
utils_align_ptr_down_size_up(&ptr, &size, (2 * 1024 * 1024));
586585

587586
errno = 0;
588587
int ret = utils_munmap(ptr, size);

0 commit comments

Comments
 (0)