OLD | NEW |
1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 PDFium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
6 | 6 |
7 #ifndef CORE_INCLUDE_FXCRT_FX_MEMORY_H_ | 7 #ifndef CORE_INCLUDE_FXCRT_FX_MEMORY_H_ |
8 #define CORE_INCLUDE_FXCRT_FX_MEMORY_H_ | 8 #define CORE_INCLUDE_FXCRT_FX_MEMORY_H_ |
9 | 9 |
10 #include "fx_system.h" | 10 #include "fx_system.h" |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 | 82 |
83 CFX_GrowOnlyPool(size_t trunk_size = 16384); | 83 CFX_GrowOnlyPool(size_t trunk_size = 16384); |
84 | 84 |
85 ~CFX_GrowOnlyPool(); | 85 ~CFX_GrowOnlyPool(); |
86 | 86 |
87 void SetTrunkSize(size_t trunk_size) | 87 void SetTrunkSize(size_t trunk_size) |
88 { | 88 { |
89 m_TrunkSize = trunk_size; | 89 m_TrunkSize = trunk_size; |
90 } | 90 } |
91 | 91 |
92 void*» AllocDebug(size_t size, FX_LPCSTR file, int line) | 92 void*» AllocDebug(size_t size, const FX_CHAR* file, int line) |
93 { | 93 { |
94 return Alloc(size); | 94 return Alloc(size); |
95 } | 95 } |
96 | 96 |
97 void* Alloc(size_t size); | 97 void* Alloc(size_t size); |
98 | 98 |
99 void*» ReallocDebug(void* p, size_t new_size, FX_LPCSTR file, int line) | 99 void*» ReallocDebug(void* p, size_t new_size, const FX_CHAR* file, int
line) |
100 { | 100 { |
101 return NULL; | 101 return NULL; |
102 } | 102 } |
103 | 103 |
104 void* Realloc(void* p, size_t new_size) | 104 void* Realloc(void* p, size_t new_size) |
105 { | 105 { |
106 return NULL; | 106 return NULL; |
107 } | 107 } |
108 | 108 |
109 void Free(void*) {} | 109 void Free(void*) {} |
110 | 110 |
111 void FreeAll(); | 111 void FreeAll(); |
112 private: | 112 private: |
113 | 113 |
114 size_t m_TrunkSize; | 114 size_t m_TrunkSize; |
115 | 115 |
116 void* m_pFirstTrunk; | 116 void* m_pFirstTrunk; |
117 }; | 117 }; |
118 #endif // __cplusplus | 118 #endif // __cplusplus |
119 | 119 |
120 #endif // CORE_INCLUDE_FXCRT_FX_MEMORY_H_ | 120 #endif // CORE_INCLUDE_FXCRT_FX_MEMORY_H_ |
OLD | NEW |