Program Listing for File Inspector.hpp¶
↰ Return to documentation for file (umpire/strategy/mixins/Inspector.hpp
)
//////////////////////////////////////////////////////////////////////////////
// Copyright (c) 2018, Lawrence Livermore National Security, LLC.
// Produced at the Lawrence Livermore National Laboratory
//
// Created by David Beckingsale, david@llnl.gov
// LLNL-CODE-747640
//
// All rights reserved.
//
// This file is part of Umpire.
//
// For details, see https://github.com/LLNL/Umpire
// Please also see the LICENSE file for MIT license.
//////////////////////////////////////////////////////////////////////////////
#ifndef UMPIRE_Inspector_HPP
#define UMPIRE_Inspector_HPP
#include <memory>
namespace umpire {
namespace strategy {
class AllocationStrategy;
namespace mixins {
class Inspector
{
public:
Inspector();
void registerAllocation(
void* ptr,
size_t size,
std::shared_ptr<umpire::strategy::AllocationStrategy> strategy);
void deregisterAllocation(void* ptr);
protected:
long m_current_size;
long m_high_watermark;
};
} // end of namespace mixins
} // end of namespace strategy
} // end of namespace umpire
#endif // UMPIRE_Inspector_HPP