/* osgEarth
* Copyright 2025 Pelican Mapping
* MIT License
*/

#ifndef OSGEARTH_MEMORY_H
#define OSGEARTH_MEMORY_H 1

#include <osgEarth/Common>
#include <cstdint>

namespace osgEarth { namespace Util
{
    class OSGEARTH_EXPORT Memory
    {
    public:
        /** Physical memory usage, in bytes, for the calling process. (aka working set or resident set) */
        static std::int64_t getProcessPhysicalUsage();

        /** Peak physical memory usage, in bytes, for the calling process since it started. */
        static std::int64_t getProcessPeakPhysicalUsage();

        /** Private bytes allocated solely to this process */
        static std::int64_t getProcessPrivateUsage();

        /** Maximum bytes allocated privately to thie process (peak pagefile usage) */
        static std::int64_t getProcessPeakPrivateUsage();

    private:
        // Not creatable.
        Memory() { }
    };
} }


#endif // OSGEARTH_MEMORY_H
