21 template <
typename Allocator>
27 for (
size_t i = 0; i < 100; i++)
28 p[i] = static_cast<uint8_t>(i);
33 for (
size_t i = 0; i < 100; i++)
35 for (
size_t i = 100; i < 200; i++)
36 q[i] = static_cast<uint8_t>(i);
41 for (
size_t i = 0; i < 150; i++)
59 for (
size_t i = 1; i < 1000; i++) {
66 #if RAPIDJSON_64BIT == 1 87 void* p =
a.Malloc(100);
88 void* q =
a.Realloc(p, 100, 200);
92 for (
size_t j = 1; j < 32; j++) {
96 for (
size_t i = 1; i < 1024; i++) {
97 q =
a.Realloc(p, i, i + 1);
TEST(Allocator, CrtAllocator)
#define EXPECT_TRUE(condition)
#define RAPIDJSON_UINT64_C2(high32, low32)
Construct a 64-bit literal by a pair of 32-bit integer.
C-runtime library allocator.
void TestAllocator(Allocator &a)
#define EXPECT_LE(val1, val2)
Default memory allocator used by the parser and DOM.
unsigned __int64 uint64_t
#define RAPIDJSON_ALIGN(x)
Data alignment of the machine.
const GenericPointer< typename T::ValueType > T2 T::AllocatorType & a
Concept for allocating, resizing and freeing memory block.
#define EXPECT_EQ(val1, val2)