Align _ODP_ISHM_SINGLE_VA address space to system page size if huge pages are not supported. Fixes _odp_ishm_init_global() failing on systems without huge page support.
Signed-off-by: Matias Elo <[email protected]> --- platform/linux-generic/_ishm.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/platform/linux-generic/_ishm.c b/platform/linux-generic/_ishm.c index c1efd7d..303a131 100644 --- a/platform/linux-generic/_ishm.c +++ b/platform/linux-generic/_ishm.c @@ -1419,6 +1419,8 @@ int _odp_ishm_init_global(void) * only address space! */ spce_addr = _odp_ishmphy_book_va(ODP_CONFIG_ISHM_VA_PREALLOC_SZ, + (odp_sys_huge_page_size() == 0) ? + odp_sys_page_size() : odp_sys_huge_page_size()); if (!spce_addr) { ODP_ERR("unable to reserve virtual space\n."); -- 2.7.4
