AuroraRuntime/Include/Aurora/Debug/MemoryCrunch.hpp

29 lines
571 B
C++
Raw Normal View History

/***
Copyright (C) 2023 J Reece Wilson (a/k/a "Reece"). All rights reserved.
File: MemoryCrunch.hpp
2023-08-10 02:42:58 +00:00
Date: 2021-6-9 - 2023-08-10
Author: Reece
***/
#pragma once
namespace Aurora::Debug
{
AUKN_SYM void AddMemoryCrunch();
AUKN_SYM void DecMemoryCrunch();
struct MemoryCrunch
{
inline MemoryCrunch()
{
AddMemoryCrunch();
}
inline ~MemoryCrunch()
{
DecMemoryCrunch();
}
};
#define AU_DEBUG_MEMCRUNCH Aurora::Debug::MemoryCrunch AU_CONCAT(__crunch, __COUNTER__);
}