Reviewers: Sven Panne,

Description:
Only use posix_memalign on Solaris if it's available

R=svenpa...@chromium.org
LOG=n
BUG=v8:3357

Please review this at https://codereview.chromium.org/719523003/

Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge

Affected files (+1, -1 lines):
  M src/allocation.cc


Index: src/allocation.cc
diff --git a/src/allocation.cc b/src/allocation.cc
index 96fd71f11bd3d55be11d7f157ee885e838c430be..0864437079c7f361e3b468323968828f4642103e 100644
--- a/src/allocation.cc
+++ b/src/allocation.cc
@@ -89,7 +89,7 @@ void* AlignedAlloc(size_t size, size_t alignment) {
   void* ptr;
 #if V8_OS_WIN
   ptr = _aligned_malloc(size, alignment);
-#elif V8_LIBC_BIONIC
+#elif V8_LIBC_BIONIC || (V8_OS_SOLARIS && !defined(HAS_POSIX_MEMALIGN))
// posix_memalign is not exposed in some Android versions, so we fall back to
   // memalign. See http://code.google.com/p/android/issues/detail?id=35391.
   ptr = memalign(alignment, size);


--
--
v8-dev mailing list
v8-dev@googlegroups.com
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to v8-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to