28 :
public std::pmr::memory_resource
31 constexpr static size_t MAGIC = 0xdeadbeefcafefeed;
33 virtual void* do_allocate (
size_t bytes, std::size_t )
override
41 virtual void do_deallocate (
void* p, [[maybe_unused]] std::size_t bytes, std::size_t )
override
43 size_t* pp =
reinterpret_cast<size_t*
>(
p);
45 assert (pp[0] == bytes);
46 assert (pp[1] == MAGIC);
50 virtual bool do_is_equal (
const std::pmr::memory_resource& other)
const noexcept override
52 return dynamic_cast<const TestMemResource*
> (&
other) !=
nullptr;
Testing an xAOD object with a non-standard memory allocator.
Define macros for attributes used to control the static checker.
#define ATLAS_THREAD_SAFE
AllocTestAuxContainer_v1()
AuxContainerBase(bool allowDynamicVars=true)
Default constructor.
void * xmalloc(size_t size)
Trapping version of malloc.
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
Trapping version of malloc.