7 std::align_val_t
misalign(static_cast<std::align_val_t
>(63U));
8 std::align_val_t
zeroalign(static_cast<std::align_val_t
>(0U));
9 std::align_val_t
onealign(static_cast<std::align_val_t
>(1U));
10 std::align_val_t
align(static_cast<std::align_val_t
>(64U));
15 // libc++ will allocate something for size zero
16 // but libstdc++ doesn't
17 mem
= operator new(size
, zeroalign
, tag
);
18 if (RUNNING_ON_VALGRIND
) {
21 operator delete(mem
, zeroalign
, tag
);
24 mem
= operator new(size
, onealign
, tag
);
26 operator delete(mem
, onealign
, tag
);
29 mem
= operator new(size
, align
);
30 operator delete(mem
, misalign
);
33 mem
= operator new[](size
, align
);
34 operator delete[](mem
, misalign
);
37 // doesn't matter that tag is uninit
38 // don't want to see an error
39 mem
= operator new(size
, misalign
, tag
);
40 operator delete(mem
, misalign
, tag
);
43 mem
= operator new[](size
, misalign
, tag
);
44 operator delete[](mem
, misalign
, tag
);
47 mem
= operator new(size
, align
);
48 operator delete(mem
, size
, misalign
);
51 mem
= operator new[](size
, align
);
52 operator delete[](mem
, size
, misalign
);
54 // initially this test had two throwing
55 // versions called from fork()s
56 // but that doesn't mix well with xml
57 // so they have split out int versions 2 and 3