Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(235)

Side by Side Diff: core/include/fxcrt/fx_memory.h

Issue 1757043002: Remove unused CFX_GrowOnlyPool. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | core/src/fxcrt/fx_basic_memmgr.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "core/include/fxcrt/fx_system.h" 10 #include "core/include/fxcrt/fx_system.h"
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 #define FX_TryAlloc(type, size) (type*) calloc(size, sizeof(type)) 71 #define FX_TryAlloc(type, size) (type*) calloc(size, sizeof(type))
72 #define FX_TryRealloc(type, ptr, size) \ 72 #define FX_TryRealloc(type, ptr, size) \
73 (type*) FX_SafeRealloc(ptr, size, sizeof(type)) 73 (type*) FX_SafeRealloc(ptr, size, sizeof(type))
74 74
75 #define FX_Free(ptr) free(ptr) 75 #define FX_Free(ptr) free(ptr)
76 76
77 class CFX_DestructObject { 77 class CFX_DestructObject {
78 public: 78 public:
79 virtual ~CFX_DestructObject() {} 79 virtual ~CFX_DestructObject() {}
80 }; 80 };
81 class CFX_GrowOnlyPool {
82 public:
83 CFX_GrowOnlyPool(size_t trunk_size = 16384);
84 81
85 ~CFX_GrowOnlyPool();
86
87 void SetTrunkSize(size_t trunk_size) { m_TrunkSize = trunk_size; }
88
89 void* AllocDebug(size_t size, const FX_CHAR* file, int line) {
90 return Alloc(size);
91 }
92
93 void* Alloc(size_t size);
94
95 void* ReallocDebug(void* p, size_t new_size, const FX_CHAR* file, int line) {
96 return NULL;
97 }
98
99 void* Realloc(void* p, size_t new_size) { return NULL; }
100
101 void Free(void* mem) {}
102
103 void FreeAll();
104
105 private:
106 size_t m_TrunkSize;
107
108 void* m_pFirstTrunk;
109 };
110 #endif // __cplusplus 82 #endif // __cplusplus
111 83
112 #endif // CORE_INCLUDE_FXCRT_FX_MEMORY_H_ 84 #endif // CORE_INCLUDE_FXCRT_FX_MEMORY_H_
OLDNEW
« no previous file with comments | « no previous file | core/src/fxcrt/fx_basic_memmgr.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698