1 // operator new(unsigned)
2 // operator new[](unsigned)
3 // operator new(unsigned, std::nothrow_t const&)
4 // operator new[](unsigned, std::nothrow_t const&)
12 // A big structure. Its details don't matter.
17 __attribute__((noinline
)) void* operator new (std::size_t n
)
22 __attribute__((noinline
)) void* operator new (std::size_t n
, std::nothrow_t
const &)
27 __attribute__((noinline
)) void* operator new[] (std::size_t n
)
32 __attribute__((noinline
)) void* operator new[] (std::size_t n
, std::nothrow_t
const &)
37 __attribute__((noinline
)) void* operator new (std::size_t size
, std::align_val_t al
)
42 __attribute__((noinline
)) void* operator new[] (std::size_t size
, std::align_val_t al
)
47 __attribute__((noinline
)) void* operator new(std::size_t size
, std::align_val_t al
, const std::nothrow_t
&) noexcept
52 __attribute__((noinline
)) void* operator new[](std::size_t size
, std::align_val_t al
, const std::nothrow_t
&) noexcept
57 __attribute__((noinline
)) void operator delete (void* p
)
62 __attribute__((noinline
)) void operator delete[] (void* p
)
67 __attribute__((noinline
)) void operator delete (void* ptr
, std::align_val_t al
) noexcept
72 __attribute__((noinline
)) void operator delete[] (void* ptr
, std::align_val_t al
) noexcept
80 s
* p2
= new (std::nothrow
) s
;
81 char* c1
= new char[2000];
82 char* c2
= new (std::nothrow
) char[2000];
83 s
* pa1
= static_cast<s
*>(operator new(sizeof(*pa1
), static_cast<std::align_val_t
>(256U)));
84 s
* pa2
= static_cast<s
*>(operator new[](sizeof(*pa2
)*10U, static_cast<std::align_val_t
>(256U)));
86 s
* pa3
= static_cast<s
*>(operator new(sizeof(*pa3
), static_cast<std::align_val_t
>(256U), tag
));
87 s
* pa4
= static_cast<s
*>(operator new[](sizeof(*pa4
)*10U, static_cast<std::align_val_t
>(256U), tag
));
92 operator delete(pa1
, static_cast<std::align_val_t
>(256U));
93 operator delete[](pa2
, static_cast<std::align_val_t
>(256U));
94 operator delete(pa3
, static_cast<std::align_val_t
>(256U));
95 operator delete[](pa4
, static_cast<std::align_val_t
>(256U));