Pac-Man Evolution
Loading...
Searching...
No Matches
MemoryManager.cpp
1/*----------------------------------------------------------------------
2Pac-Man Evolution - Roberto Prieto
3Copyright (C) 2018-2024 MegaStorm Systems
4contact@megastormsystems.com - http://www.megastormsystems.com
5
6This software is provided 'as-is', without any express or implied
7warranty. In no event will the authors be held liable for any damages
8arising from the use of this software.
9
10Permission is granted to anyone to use this software for any purpose,
11including commercial applications, and to alter it and redistribute it
12freely, subject to the following restrictions:
13
141. The origin of this software must not be misrepresented; you must not
15claim that you wrote the original software. If you use this software
16in a product, an acknowledgment in the product documentation would be
17appreciated but is not required.
182. Altered source versions must be plainly marked as such, and must not be
19misrepresented as being the original software.
203. This notice may not be removed or altered from any source distribution.
21
22------------------------------------------------------------------------
23
24Memory Manager
25
26------------------------------------------------------------------------ */
27
28// Includes
29#include "MemoryManager.h"
30
31// CMemPME class implementation
32#ifdef USE_CMEM
33void* CMemPME::operator new(size_t iSize, const std::nothrow_t& n)
34{
35 void* pMem = CMem::alloc(iSize, 1);
36 return pMem;
37}
38void CMemPME::operator delete(void* pMem, const std::nothrow_t& n)
39{
40 CMem::free(pMem);
41}
42void CMemPME::operator delete(void* pMem)
43{
44 CMem::free(pMem);
45}
46#endif