summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAliaksey Kandratsenka <alk@tut.by>2015-09-26 09:58:45 -0700
committerAliaksey Kandratsenka <alk@tut.by>2015-09-26 09:58:45 -0700
commite53aef24add50bdee5ab2943d96e5c5b2b3bf596 (patch)
tree1a026cd01e8bd99f77ebcc2d78ccb142c5bfc737
parent7707582448d5bdf311d88726c5f77fcbb0bedd09 (diff)
downloadgperftools-e53aef24add50bdee5ab2943d96e5c5b2b3bf596.tar.gz
don't try to test memalign on windows
This unbreaks tcmalloc_unittest.cc on windows.
-rw-r--r--src/tests/tcmalloc_unittest.cc11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/tests/tcmalloc_unittest.cc b/src/tests/tcmalloc_unittest.cc
index 69698bc..bbbe577 100644
--- a/src/tests/tcmalloc_unittest.cc
+++ b/src/tests/tcmalloc_unittest.cc
@@ -1048,10 +1048,13 @@ static void TestSetNewMode() {
}
static void TestErrno(void) {
- errno = 0;
- void* ret = memalign(128, kTooBig);
- EXPECT_EQ(NULL, ret);
- EXPECT_EQ(ENOMEM, errno);
+ void* ret;
+ if (kOSSupportsMemalign) {
+ errno = 0;
+ Memalign(128, kTooBig);
+ EXPECT_EQ(NULL, ret);
+ EXPECT_EQ(ENOMEM, errno);
+ }
errno = 0;
ret = malloc(kTooBig);