2023-08-10 02:34:44 +00:00
|
|
|
/***
|
|
|
|
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
|
2023-08-10 02:34:44 +00:00
|
|
|
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__);
|
|
|
|
}
|