mFrame
載入中...
搜尋中...
無符合項目
DefaultAllocator.h
1
7#ifndef MFRAME_0F21FC8D_526B_44F7_979F_3BE0419947B1
8#define MFRAME_0F21FC8D_526B_44F7_979F_3BE0419947B1
9
10/* ***************************************************************************************
11 * Include
12 */
13
14//----------------------------------------------------------------------------------------
15
16//----------------------------------------------------------------------------------------
17#include "./../lang/Object.h"
18#include "./../sys/Allocator.h"
19
20/* ***************************************************************************************
21 * Namespace
22 */
23namespace ufm::sys {
24 class DefaultAllocator;
25} // namespace ufm::sys
26
27/* ***************************************************************************************
28 * Class/Interface/Struct/Enum
29 */
30
40 /* *************************************************************************************
41 * Variable
42 */
43
44 /* *************************************************************************************
45 * Abstract Method
46 */
47
48 /* *************************************************************************************
49 * Construct Method
50 */
51 public:
59
66 virtual ~DefaultAllocator(void) override;
67
68 /* *************************************************************************************
69 * Operator Method
70 */
71
72 /* *************************************************************************************
73 * Override Method - ufm::sys::Allocator
74 */
75 public:
82 virtual void* alloc(int size) override;
83
92 virtual bool free(void* ptr, int size = 0) override;
93
99 virtual int getFree(void) override;
100
106 virtual int getTotal(void) override;
107
108 /* *************************************************************************************
109 * Public Method
110 */
111
112 /* *************************************************************************************
113 * Protected Method
114 */
115
116 /* *************************************************************************************
117 * Private Method
118 */
119
120 /* *************************************************************************************
121 * Static Variable
122 */
123
124 /* *************************************************************************************
125 * Static Method
126 */
127};
128
129/* ***************************************************************************************
130 * End of file
131 */
132
133#endif /* MFRAME_0F21FC8D_526B_44F7_979F_3BE0419947B1 */
物件基底類別
Definition Object.h:63
預設記憶體分配器
Definition DefaultAllocator.h:39
DefaultAllocator(void)
建立一個新的預設記憶體分配器
virtual ~DefaultAllocator(void) override
釋放預設記憶體分配器
virtual int getTotal(void) override
取得總記憶體大小
virtual bool free(void *ptr, int size=0) override
釋放先前分配的記憶體
virtual void * alloc(int size) override
分配指定大小的記憶體
virtual int getFree(void) override
取得剩餘的可用記憶體數量
系統功能相關的命名空間
Definition Object.h:31
[Interface] 記憶體分配器介面
Definition Allocator.h:38