//memctrl.h - [2020-04-13 11:57:47]
#ifndef _MEMCTRL_H_
#define _MEMCTRL_H_

#include <stdio.h>
#include <stdlib.h>
#include "common_type.h"
#include "mem_enum.h"

//#ifndef RAPIDXML_HPP_INCLUDED

/*
00267064 operator new(uint,EFTTMemHeapID,int)
0026706A operator new[](uint,EFTTMemHeapID,int)
00267070 operator delete(void *,EFTTMemHeapID,int)
00267074 operator delete[](void *,EFTTMemHeapID,int)
00267078 operator delete(void *)
0026707C operator delete[](void *)
00267080 _malloc_r(_reent *,uint)
00267086 _realloc_r(_reent *,void *,uint)
0026708C _calloc_r(_reent *,uint,uint)
00267094 _free_r(_reent *,void *)
0026709A xzmalloc
002670A8 xzfree
*/

//For C++
void* operator new(size_t size, EFTTMemHeapID eID, int dMod); //00267064
void* operator new[](size_t size, EFTTMemHeapID eID, int dMod); //0026706A

void operator delete(void* pMem) noexcept;  //00267078
void operator delete[](void* pMem) noexcept;//0026707C

#define new new(EFTTMemHeapID_0, 0)

#define new10 new(EFTTMemHeapID_0, 0x10)
#define new20 new(EFTTMemHeapID_0, 0x20)
//#endif

#endif  //_MEMCTRL_H_