mirror of
https://github.com/gperftools/gperftools
synced 2025-02-16 20:28:04 +00:00
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:
parent
bf640cd740
commit
5618ef7850
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user