2 Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
5 #include "AthAllocators/ArenaCachingHandle.h"
6 #include "AthAllocators/ArenaHandle.h"
7 #include "AthAllocators/ArenaPoolAllocator.h"
9 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
13 SegMemSvc::allocate(SegMemSvc::LIFETIME life, bool cache) {
18 typedef SG::ArenaCachingHandle<T, SG::ArenaPoolAllocator> Handle_t;
19 if (life == SegMemSvc::EVENT) {
20 ptr = (T*)Handle_t(&m_ahead_evt).allocate();
21 } else if (life == SegMemSvc::JOB) {
22 ptr = (T*)Handle_t(&m_ahead_job).allocate();
23 } else if (life == SegMemSvc::INCIDENT) {
24 ptr = (T*)Handle_t(&m_ahead_inc).allocate();
27 typedef SG::ArenaHandle<T, SG::ArenaPoolAllocator> Handle_t;
28 if (life == SegMemSvc::EVENT) {
29 ptr = (T*)Handle_t(&m_ahead_evt).allocate();
30 } else if (life == SegMemSvc::JOB) {
31 ptr = (T*)Handle_t(&m_ahead_job).allocate();
32 } else if (life == SegMemSvc::INCIDENT) {
33 ptr = (T*)Handle_t(&m_ahead_inc).allocate();
37 if (msgStream().level() <= MSG::DEBUG) {
38 debug() << "allocating object size " << sizeof(T)
39 << " with lifetime/cache " << cvt(life) << "/" << cache << " at "
48 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
52 SegMemSvc::del(T* ptr) {
54 if (msgStream().level() <= MSG::DEBUG) {
55 debug() << "deleting object at " << ptr << endmsg;