29 #include "gtest/gtest.h" 45 TEST(aligned, contents_larger)
49 for (
int n = 0; n < 50; ++n)
52 for (
int n = 0; n < 50; ++n)
59 TEST(aligned, contents_same)
63 for (
int n = 0; n < 50; ++n)
66 for (
int n = 0; n < 50; ++n)
73 TEST(aligned, contents_smaller)
77 for (
int n = 0; n < 50; ++n)
80 for (
int n = 0; n < 49; ++n)
89 static const size_t good_alignments[] = {1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192};
90 for (
size_t a = 0;
a <= 8192; ++
a)
93 for (
const auto t: good_alignments)
if (
a == t) good =
true;
void * aligned_malloc(size_t bytes, size_t align)
void * aligned_realloc(void *ptr, size_t bytes, size_t align)
_W64 unsigned int uintptr_t
const GenericPointer< typename T::ValueType > T2 T::AllocatorType & a
#define ASSERT_TRUE(condition)
void aligned_free(void *ptr)
TEST(aligned, large_null)