[PATCH] D28512: [libc++] Pair _aligned_malloc with _aligned_free

Shoaib Meenai via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jan 11 22:33:29 PST 2017


This revision was automatically updated to reflect the committed changes.
Closed by commit rL291743: [libc++] Pair _aligned_malloc with _aligned_free (authored by smeenai).

Changed prior to commit:
  https://reviews.llvm.org/D28512?vs=83783&id=84075#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D28512

Files:
  libcxx/trunk/src/new.cpp


Index: libcxx/trunk/src/new.cpp
===================================================================
--- libcxx/trunk/src/new.cpp
+++ libcxx/trunk/src/new.cpp
@@ -198,7 +198,11 @@
 operator delete(void* ptr, std::align_val_t) _NOEXCEPT
 {
     if (ptr)
+#if defined(_LIBCPP_MSVCRT)
+        ::_aligned_free(ptr);
+#else
         ::free(ptr);
+#endif
 }
 
 _LIBCPP_WEAK


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D28512.84075.patch
Type: text/x-patch
Size: 368 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170112/3ceec231/attachment.bin>


More information about the cfe-commits mailing list