00001 /* 00002 * $Id: Memory.h,v 1.10 2003/08/05 14:33:57 mindstorm2600 Exp $ 00003 */ 00004 #ifndef __CLAW_MEMORY_H__ 00005 #define __CLAW_MEMORY_H__ 00006 #include<System.h> 00007 #include<Array.h> 00008 #include<AutomatedGC.h> 00009 00010 namespace clawsoft{ 00024 class Memory:public System{ 00025 private: 00026 AutomatedGC *garbage; 00027 bool usingGC; 00028 public: 00034 Memory(); 00035 ~Memory(); 00040 static void *allocBuffer(Uint32 size); 00041 static void *reallocBuffer(void *buf, Uint32 newsize); 00048 static void freeBuffer(void **buf); 00054 void *temporaryAlloc(Uint32 size, Uint32 timeout = 60); 00059 static void clearBuffer(void *buf, Uint32 siz, Uint8 value = 0); 00063 static void *duplicate(const void *buf, Uint32 siz); 00066 static void copy(void *destination, const void *source, Uint32 siz); 00067 }; 00068 }; 00069 00070 #endif
Authors:
Juan V. Guerrero
Jannette C. Mejia
Juan C. Guevara
Powered by: