[intel][compiler] Use os_malloc_aligned

Change-Id: I272574596645fb5f8da7c59fce546e07e543e87b
diff --git a/src/intel/compiler/brw_fs_bank_conflicts.cpp b/src/intel/compiler/brw_fs_bank_conflicts.cpp
index 938ebcc..798a74d 100644
--- a/src/intel/compiler/brw_fs_bank_conflicts.cpp
+++ b/src/intel/compiler/brw_fs_bank_conflicts.cpp
@@ -50,6 +50,7 @@
 
 #include "brw_fs.h"
 #include "brw_cfg.h"
+#include "util/os_memory.h"
 
 #ifdef __SSE2__
 
@@ -288,7 +289,7 @@
 
       ~weight_vector_type()
       {
-         free(v);
+         os_free_aligned(v);
       }
 
       weight_vector_type &
@@ -308,8 +309,8 @@
       {
          const unsigned align = MAX2(sizeof(void *), __alignof__(vector_type));
          const unsigned size = DIV_ROUND_UP(n, vector_width) * sizeof(vector_type);
-         void *p;
-         if (posix_memalign(&p, align, size))
+         void *p = os_malloc_aligned(size, align);
+         if (!p)
             return NULL;
          memset(p, 0, size);
          return reinterpret_cast<vector_type *>(p);