Fix aligned memory allocation in the stub library
authorJonathan Peyton <jonathan.l.peyton@intel.com>
Wed, 29 Nov 2017 22:29:38 +0000 (22:29 +0000)
committerJonathan Peyton <jonathan.l.peyton@intel.com>
Wed, 29 Nov 2017 22:29:38 +0000 (22:29 +0000)
commit62da55020b2ae14b41dcd59b0170f6f5bd1392a4
treecbae1def6bddd01ad37f8d223dbac593cd0aede9
parent64249504b5d6a4e28921cf646833a11a5138ec96
Fix aligned memory allocation in the stub library

kmp_aligned_malloc() always returned NULL on Windows (stub library only)
that may cause Fortran application crash.  With this change all memory
allocation functions were fixed to use aligned{m,re,rec}alloc() to
allocate/reallocate memory. To deallocate that memory _aligned_free() is
used in kmp_free().

Patch by Olga Malysheva

Differential Revision: https://reviews.llvm.org/D40296

llvm-svn: 319375
openmp/runtime/src/kmp_stub.cpp