Public API Reference |
00001 /* 00002 * AE Engine 00003 * 00004 * Copyright (C) 2003 Riku "Rakkis" Nurminen 00005 * 00006 * This memory manager originally contributed by swente <ssuebert@web.de> 00007 * 00008 * This program is free software; you can redistribute it and/or modify 00009 * it under the terms of the GNU General Public License as published by 00010 * the Free Software Foundation; either version 2 of the License, or 00011 * (at your option) any later version. 00012 * 00013 * This program is distributed in the hope that it will be useful, 00014 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00016 * GNU General Public License for more details. 00017 * 00018 * You should have received a copy of the GNU General Public License 00019 * along with this program; if not, write to the Free Software 00020 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00021 * 00022 */ 00023 00024 #ifndef __AELIB_AEMM_MEMORYMANAGER_H__ 00025 #define __AELIB_AEMM_MEMORYMANAGER_H__ 00026 00027 #include <aedefs.h> 00028 #include <aereg/base.h> 00029 00034 class aeMemoryManager: public aeBase { 00035 private: 00037 static aeMemoryManager *pglob_self; 00039 aeBlockDescriptorMap m_blockdescriptormap; 00041 int m_blocks; 00043 int m_maxdumpbytes; 00044 00045 public: 00054 aeMemoryManager(int blocks, int maxdumpbytes = 256); 00055 00056 ~aeMemoryManager(); 00057 00064 static void registerBlock(void *addr, size_t size, const char *filename, int linenumber); 00065 00073 static void unregisterBlock(void *addr); 00074 }; 00075 00076 #endif // __AELIB_AEMM_MEMORYMANAGER_H__