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 #include "xfa/fgas/crt/fgas_memory.h" | 7 #include "xfa/fgas/crt/fgas_memory.h" |
8 | 8 |
| 9 #ifndef MEMORY_TOOL_REPLACES_ALLOCATOR |
9 #define MEMORY_TOOL_REPLACES_ALLOCATOR // Temporary, for CF testing. | 10 #define MEMORY_TOOL_REPLACES_ALLOCATOR // Temporary, for CF testing. |
| 11 #endif |
10 | 12 |
11 #include <algorithm> | 13 #include <algorithm> |
12 | 14 |
13 #ifdef MEMORY_TOOL_REPLACES_ALLOCATOR | 15 #ifdef MEMORY_TOOL_REPLACES_ALLOCATOR |
14 | 16 |
15 namespace { | 17 namespace { |
16 | 18 |
17 class CFX_DefStore : public IFX_MemoryAllocator, public CFX_Target { | 19 class CFX_DefStore : public IFX_MemoryAllocator, public CFX_Target { |
18 public: | 20 public: |
19 CFX_DefStore() {} | 21 CFX_DefStore() {} |
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
240 } | 242 } |
241 } | 243 } |
242 size_t CFX_FixedStore::SetDefChunkSize(size_t iChunkSize) { | 244 size_t CFX_FixedStore::SetDefChunkSize(size_t iChunkSize) { |
243 ASSERT(iChunkSize != 0); | 245 ASSERT(iChunkSize != 0); |
244 size_t v = m_iDefChunkSize; | 246 size_t v = m_iDefChunkSize; |
245 m_iDefChunkSize = FX_4BYTEALIGN(iChunkSize); | 247 m_iDefChunkSize = FX_4BYTEALIGN(iChunkSize); |
246 return v; | 248 return v; |
247 } | 249 } |
248 | 250 |
249 #endif // MEMORY_TOOL_REPLACES_ALLOCATOR | 251 #endif // MEMORY_TOOL_REPLACES_ALLOCATOR |
OLD | NEW |