TrinityCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
MemoryManager.h
Go to the documentation of this file.
1 
11 #ifndef G3D_MemoryManager_h
12 #define G3D_MemoryManager_h
13 
14 #include "G3D/platform.h"
15 #include "G3D/ReferenceCount.h"
16 
17 namespace G3D {
18 
25 protected:
26 
27  MemoryManager();
28 
29 public:
30 
31  typedef shared_ptr<class MemoryManager> Ref;
32 
36  virtual void* alloc(size_t s);
37 
41  virtual void free(void* ptr);
42 
45  virtual bool isThreadsafe() const;
46 
49  static MemoryManager::Ref create();
50 };
51 
56 protected:
57 
59 
60 public:
61 
62  typedef shared_ptr<class AlignedMemoryManager> Ref;
63 
64 
65  virtual void* alloc(size_t s);
66 
67  virtual void free(void* ptr);
68 
69  virtual bool isThreadsafe() const;
70 
72 };
73 
74 
78 protected:
80 
81 public:
82  typedef shared_ptr<class MemoryManager> Ref;
83  virtual void* alloc(size_t s);
84  virtual void free(void* ptr);
85  virtual bool isThreadsafe() const;
86 
90 };
91 
92 }
93 
94 #endif
virtual void * alloc(size_t s)
Definition: MemoryManager.cpp:46
static MemoryManager::Ref create()
Definition: MemoryManager.cpp:35
static AlignedMemoryManager::Ref create()
Definition: MemoryManager.cpp:61
virtual void free(void *ptr)
Definition: MemoryManager.cpp:25
Definition: AABox.h:25
Definition: MemoryManager.h:77
virtual void free(void *ptr)
Definition: MemoryManager.cpp:77
Definition: MemoryManager.h:55
shared_ptr< class MemoryManager > Ref
Definition: MemoryManager.h:31
virtual void * alloc(size_t s)
Definition: MemoryManager.cpp:20
Definition: MemoryManager.h:24
shared_ptr< class AlignedMemoryManager > Ref
Definition: MemoryManager.h:62
Definition: ReferenceCount.h:24
static CRTMemoryManager::Ref create()
Definition: MemoryManager.cpp:87
AlignedMemoryManager()
Definition: MemoryManager.cpp:43
CRTMemoryManager()
Definition: MemoryManager.cpp:69
virtual bool isThreadsafe() const
Definition: MemoryManager.cpp:30
virtual bool isThreadsafe() const
Definition: MemoryManager.cpp:56
shared_ptr< class MemoryManager > Ref
Definition: MemoryManager.h:82
virtual void free(void *ptr)
Definition: MemoryManager.cpp:51
virtual bool isThreadsafe() const
Definition: MemoryManager.cpp:82
virtual void * alloc(size_t s)
Definition: MemoryManager.cpp:72
MemoryManager()
Definition: MemoryManager.cpp:17