summaryrefslogtreecommitdiff
path: root/xfa/fgas/crt/fgas_memory.cpp
diff options
context:
space:
mode:
authordsinclair <dsinclair@chromium.org>2016-05-19 18:07:11 -0700
committerCommit bot <commit-bot@chromium.org>2016-05-19 18:07:11 -0700
commitfc2cdf8657534467fd807e216d50650b0e959868 (patch)
treea0642ba14ee4e438e97957825772e8dd16e347a2 /xfa/fgas/crt/fgas_memory.cpp
parent411f1185f44b7862a9b1c16e588407ae197752dd (diff)
downloadpdfium-fc2cdf8657534467fd807e216d50650b0e959868.tar.xz
fgas/ code cleanup.
This CL shuffles code around in the fgas/ headers, removes unused functions and adds anonymous namepaces for static methods and data. Review-Url: https://codereview.chromium.org/1992033002
Diffstat (limited to 'xfa/fgas/crt/fgas_memory.cpp')
-rw-r--r--xfa/fgas/crt/fgas_memory.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/xfa/fgas/crt/fgas_memory.cpp b/xfa/fgas/crt/fgas_memory.cpp
index 9176466a61..d218f42aa4 100644
--- a/xfa/fgas/crt/fgas_memory.cpp
+++ b/xfa/fgas/crt/fgas_memory.cpp
@@ -20,6 +20,7 @@ class CFX_DefStore : public IFX_MemoryAllocator, public CFX_Target {
public:
CFX_DefStore() {}
~CFX_DefStore() override {}
+
void* Alloc(size_t size) override { return FX_Alloc(uint8_t, size); }
void Free(void* pBlock) override { FX_Free(pBlock); }
};
@@ -44,12 +45,13 @@ struct FX_STATICSTORECHUNK {
class CFX_StaticStore : public IFX_MemoryAllocator, public CFX_Target {
public:
- CFX_StaticStore(size_t iDefChunkSize = 4096);
+ CFX_StaticStore(size_t iDefChunkSize);
~CFX_StaticStore() override;
+
void* Alloc(size_t size) override;
void Free(void* pBlock) override {}
- protected:
+ private:
size_t m_iAllocatedSize;
size_t m_iDefChunkSize;
FX_STATICSTORECHUNK* m_pChunk;
@@ -74,7 +76,7 @@ class CFX_FixedStore : public IFX_MemoryAllocator, public CFX_Target {
void* Alloc(size_t size) override;
void Free(void* pBlock) override;
- protected:
+ private:
FX_FIXEDSTORECHUNK* AllocChunk();
size_t m_iBlockSize;