24 #ifndef PPL_ppl_prolog_common_inlines_hh
25 #define PPL_ppl_prolog_common_inlines_hh 1
27 #if PROLOG_TRACK_ALLOCATION || NOISY_PROLOG_TRACK_ALLOCATION
34 Allocation_Tracker::insert(
const T* p) {
35 #if NOISY_PROLOG_TRACK_ALLOCATION
36 std::cerr <<
"inserting " <<
typeid(*p).name()
37 <<
" at " << std::hex << (
void*) p << std::endl;
39 std::pair<Set::iterator, bool> stat = s.insert(p);
41 std::cerr <<
"Interfaces::Prolog::Allocation_Tracker:"
42 " two objects at the same address at the same time?!"
50 Allocation_Tracker::weak_insert(
const T* p) {
51 #if NOISY_PROLOG_TRACK_ALLOCATION
52 std::cerr <<
"inserting weak " <<
typeid(*p).name()
53 <<
" at " << std::hex << (
void*) p << std::endl;
60 Allocation_Tracker::remove(
const T* p) {
61 #if NOISY_PROLOG_TRACK_ALLOCATION
62 std::cerr <<
"removing " <<
typeid(*p).name()
63 <<
" at " << std::hex << (
void*) p << std::endl;
65 if (s.erase(p) != 1) {
66 std::cerr <<
"Interfaces::Prolog::Allocation_Tracker:"
67 " attempt to deallocate a nonexistent polyhedron."
75 Allocation_Tracker::check(
const T* p)
const {
76 if (s.find(p) == s.end()
77 && weak_s.find(p) == weak_s.end()) {
78 std::cerr <<
"Interfaces::Prolog::Allocation_Tracker:"
79 " attempt to access a nonexistent "
81 <<
" at " << std::hex << (
void*) p << std::endl;
86 #endif // PROLOG_TRACK_ALLOCATION || NOISY_PROLOG_TRACK_ALLOCATION
88 #endif // !defined(PPL_ppl_prolog_common_inlines_hh)