Commit 28b60eda authored by Robert Schmidt's avatar Robert Schmidt

Use posix_memalign() for pnf_p7_t creation

Some L1 functions might get a pointer to P7 structures, and use SIMD in
which case the memory access needs to be aligned.
parent 3fb20d96
...@@ -21,10 +21,11 @@ ...@@ -21,10 +21,11 @@
nfapi_pnf_p7_config_t* nfapi_pnf_p7_config_create() nfapi_pnf_p7_config_t* nfapi_pnf_p7_config_create()
{ {
pnf_p7_t* _this = (pnf_p7_t*)calloc(1, sizeof(pnf_p7_t)); pnf_p7_t* _this = NULL;
int rc = posix_memalign((void**)&_this, 32, sizeof(pnf_p7_t));
if(_this == 0) if (_this == NULL || rc != 0)
return 0; return 0;
// set the default parameters // set the default parameters
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment