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 XFA_SRC_FGAS_CRT_FGAS_MEMORY_H_ | 7 #ifndef XFA_FGAS_CRT_FGAS_MEMORY_H_ |
8 #define XFA_SRC_FGAS_CRT_FGAS_MEMORY_H_ | 8 #define XFA_FGAS_CRT_FGAS_MEMORY_H_ |
9 | 9 |
10 #include "core/include/fxcrt/fx_memory.h" | 10 #include "core/include/fxcrt/fx_memory.h" |
11 #include "core/include/fxcrt/fx_system.h" | 11 #include "core/include/fxcrt/fx_system.h" |
12 | 12 |
13 class IFX_MEMAllocator; | 13 class IFX_MEMAllocator; |
14 class CFX_Target; | 14 class CFX_Target; |
15 enum FX_ALLOCTYPE { | 15 enum FX_ALLOCTYPE { |
16 FX_ALLOCTYPE_Default = 0, | 16 FX_ALLOCTYPE_Default = 0, |
17 FX_ALLOCTYPE_Static, | 17 FX_ALLOCTYPE_Static, |
18 FX_ALLOCTYPE_Fixed, | 18 FX_ALLOCTYPE_Fixed, |
(...skipping 30 matching lines...) Expand all Loading... |
49 void operator delete(void* p, void* place) {} | 49 void operator delete(void* p, void* place) {} |
50 }; | 50 }; |
51 | 51 |
52 #define FXTARGET_NewWith(__allocator__) new (__allocator__) | 52 #define FXTARGET_NewWith(__allocator__) new (__allocator__) |
53 #define FXTARGET_DeleteWith(__class__, __allocator__, pointer) \ | 53 #define FXTARGET_DeleteWith(__class__, __allocator__, pointer) \ |
54 { \ | 54 { \ |
55 (pointer)->~__class__(); \ | 55 (pointer)->~__class__(); \ |
56 (pointer)->operator delete((pointer), (__allocator__)); \ | 56 (pointer)->operator delete((pointer), (__allocator__)); \ |
57 } | 57 } |
58 | 58 |
59 #endif // XFA_SRC_FGAS_CRT_FGAS_MEMORY_H_ | 59 #endif // XFA_FGAS_CRT_FGAS_MEMORY_H_ |
OLD | NEW |