enabling ARM and INTEL memory alignment

This commit is contained in:
brobert
2025-04-01 12:23:03 +00:00
committed by Romain Beurdouche
parent a0f16e7e83
commit db27b09b7c
+8 -1
View File
@@ -306,7 +306,14 @@ static void oran_allocate_buffers(void *handle,
uint32_t xran_max_antenna_nr = RTE_MAX(fh_config->neAxc, fh_config->neAxcUl);
uint32_t xran_max_sections_per_slot = RTE_MAX(fh_config->max_sections_per_slot, XRAN_MIN_SECTIONS_PER_SLOT);
pi->buf_list = _mm_malloc(sizeof(*pi->buf_list), 256);
#if defined(__arm__) || defined(__aarch64__)
// ARM-specific memory allocation
int ret = posix_memalign((void**)&pi->buf_list, 256, sizeof(*pi->buf_list));
AssertFatal(ret == 0, "out of memory\n");
#else
// Intel-specific memory allocation
pi->buf_list = _mm_malloc(sizeof(*pi->buf_list), 256);
#endif
AssertFatal(pi->buf_list != NULL, "out of memory\n");
oran_buf_list_t *bl = pi->buf_list;