Files
NazaraEngine/include/Nazara/Core/MemoryManager.hpp
Lynix 1fc17c8b53 Separate NAZARA_API into multiple defines (one per module)
To fix inter-module dependency


Former-commit-id: 64704f020e0af22e529d38527323ba977187d4d0
2015-06-13 22:31:29 +02:00

41 lines
1.0 KiB
C++

// Copyright (C) 2015 Jérôme Leclercq
// This file is part of the "Nazara Engine - Core module"
// For conditions of distribution and use, see copyright notice in Config.hpp
#pragma once
#ifndef NAZARA_MEMORYMANAGER_HPP
#define NAZARA_MEMORYMANAGER_HPP
#include <Nazara/Prerequesites.hpp>
#include <cstdio>
#include <cstring>
class NAZARA_CORE_API NzMemoryManager
{
public:
static void* Allocate(std::size_t size, bool multi = false, const char* file = nullptr, unsigned int line = 0);
static void EnableAllocationLogging(bool logAllocations);
static void Free(void* pointer, bool multi = false);
static unsigned int GetAllocatedBlockCount();
static std::size_t GetAllocatedSize();
static unsigned int GetAllocationCount();
static bool IsAllocationLoggingEnabled();
static void NextFree(const char* file, unsigned int line);
private:
NzMemoryManager();
~NzMemoryManager();
static void Initialize();
static void TimeInfo(char buffer[23]);
static void Uninitialize();
};
#endif // NAZARA_MEMORYMANAGER_HPP