Don't assume memalign exists in memalign vs nallocx test

OSX and windows have issues with memalign. So test against tc_memalign
instead.

This should fix _memalign linker-time part of issue #870.
This commit is contained in:
Aliaksey Kandratsenka 2017-02-20 15:31:41 -08:00
parent bf640cd740
commit 5618ef7850

View File

@ -1101,7 +1101,7 @@ static void TestNAllocXAlignment() {
size_t rounded = nallocx(size, MALLOCX_LG_ALIGN(align));
ASSERT_GE(rounded, size);
ASSERT_EQ(rounded % (1 << align), 0);
void* ptr = memalign(1 << align, size);
void* ptr = tc_memalign(1 << align, size);
ASSERT_EQ(rounded, MallocExtension::instance()->GetAllocatedSize(ptr));
free(ptr);
}